Commit 436e2a83 authored by Thomas Müller's avatar Thomas Müller Committed by GitHub
Browse files

Allow php 5.3 syntax in index.php so that the proper error can be generated...

Allow php 5.3 syntax in index.php so that the proper error can be generated and not a parse exception - fixes #26317 (#26330)
parent 4b6f98ad
......@@ -46,7 +46,7 @@ try {
OC::handleRequest();
} catch(\OC\ServiceUnavailableException $ex) {
\OC::$server->getLogger()->logException($ex, ['app' => 'index']);
\OC::$server->getLogger()->logException($ex, array('app' => 'index'));
//show the user a detailed error page
OC_Response::setStatus(OC_Response::STATUS_SERVICE_UNAVAILABLE);
......@@ -56,10 +56,10 @@ try {
OC_Template::printErrorPage($ex->getMessage(), $ex->getHint());
} catch (\OC\User\LoginException $ex) {
OC_Response::setStatus(OC_Response::STATUS_FORBIDDEN);
OC_Template::printErrorPage($ex->getMessage(), $ex->getHint());
OC_Template::printErrorPage($ex->getMessage());
} catch (Exception $ex) {
try {
\OC::$server->getLogger()->logException($ex, ['app' => 'index']);
\OC::$server->getLogger()->logException($ex, array('app' => 'index'));
//show the user a detailed error page
OC_Response::setStatus(OC_Response::STATUS_INTERNAL_SERVER_ERROR);
......@@ -73,7 +73,7 @@ try {
echo('</body></html>');
}
} catch (Error $ex) {
\OC::$server->getLogger()->logException($ex, ['app' => 'index']);
\OC::$server->getLogger()->logException($ex, array('app' => 'index'));
OC_Response::setStatus(OC_Response::STATUS_INTERNAL_SERVER_ERROR);
OC_Template::printExceptionErrorPage($ex);
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment