Use dummy request method in CLI
This commit is contained in:
parent
afa1a6d2b3
commit
f3f55654ce
1 changed files with 5 additions and 1 deletions
|
@ -23,7 +23,11 @@ class OC_Router {
|
|||
|
||||
public function __construct() {
|
||||
$baseUrl = OC_Helper::linkTo('', 'index.php');
|
||||
$method = $_SERVER['REQUEST_METHOD'];
|
||||
if (OC::$CLI) {
|
||||
$method = $_SERVER['REQUEST_METHOD'];
|
||||
}else{
|
||||
$method = 'GET';
|
||||
}
|
||||
$host = OC_Request::serverHost();
|
||||
$schema = OC_Request::serverProtocol();
|
||||
$this->context = new RequestContext($baseUrl, $method, $host, $schema);
|
||||
|
|
Loading…
Reference in a new issue