Use dummy request method in CLI

remotes/origin/stable5
Robin Appelman 12 years ago
parent afa1a6d2b3
commit f3f55654ce
  1. 6
      lib/router.php

@ -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…
Cancel
Save