aboutsummaryrefslogtreecommitdiffstats
path: root/lib/router.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/router.php')
-rw-r--r--lib/router.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/router.php b/lib/router.php
index 746b68c2c0c..dbaca9e0d5d 100644
--- a/lib/router.php
+++ b/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);