Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2013-02-07 21:28:56 +0400
committerRobin Appelman <icewind@owncloud.com>2013-02-07 21:28:56 +0400
commitf3f55654ce0202bcb00e692ea318b2f165354746 (patch)
tree1b6ca5bb1c888d373b95a9d94532b185225688a4 /lib/router.php
parentafa1a6d2b3cc1b07c7e99b370ad88f9473c50add (diff)
Use dummy request method in CLI
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..fbf56a1bb42 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);