Don't try to use routes when called from cli
This commit is contained in:
parent
6cff5418a7
commit
afa1a6d2b3
18
lib/base.php
18
lib/base.php
|
@ -554,14 +554,16 @@ class OC {
|
||||||
self::checkUpgrade();
|
self::checkUpgrade();
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
if (!self::$CLI) {
|
||||||
OC::getRouter()->match(OC_Request::getPathInfo());
|
try {
|
||||||
return;
|
OC::getRouter()->match(OC_Request::getPathInfo());
|
||||||
} catch (Symfony\Component\Routing\Exception\ResourceNotFoundException $e) {
|
return;
|
||||||
//header('HTTP/1.0 404 Not Found');
|
} catch (Symfony\Component\Routing\Exception\ResourceNotFoundException $e) {
|
||||||
} catch (Symfony\Component\Routing\Exception\MethodNotAllowedException $e) {
|
//header('HTTP/1.0 404 Not Found');
|
||||||
OC_Response::setStatus(405);
|
} catch (Symfony\Component\Routing\Exception\MethodNotAllowedException $e) {
|
||||||
return;
|
OC_Response::setStatus(405);
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$app = OC::$REQUESTEDAPP;
|
$app = OC::$REQUESTEDAPP;
|
||||||
|
|
Loading…
Reference in New Issue