From f3f55654ce0202bcb00e692ea318b2f165354746 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Thu, 7 Feb 2013 18:28:56 +0100 Subject: Use dummy request method in CLI --- lib/router.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lib/router.php') 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); -- cgit v1.2.3