Don't try to use routes when called from cli
This commit is contained in:
parent
6cff5418a7
commit
afa1a6d2b3
|
@ -554,6 +554,7 @@ class OC {
|
||||||
self::checkUpgrade();
|
self::checkUpgrade();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!self::$CLI) {
|
||||||
try {
|
try {
|
||||||
OC::getRouter()->match(OC_Request::getPathInfo());
|
OC::getRouter()->match(OC_Request::getPathInfo());
|
||||||
return;
|
return;
|
||||||
|
@ -563,6 +564,7 @@ class OC {
|
||||||
OC_Response::setStatus(405);
|
OC_Response::setStatus(405);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$app = OC::$REQUESTEDAPP;
|
$app = OC::$REQUESTEDAPP;
|
||||||
$file = OC::$REQUESTEDFILE;
|
$file = OC::$REQUESTEDFILE;
|
||||||
|
|
Loading…
Reference in New Issue