Skip to content
Snippets Groups Projects
Commit bd775b2b authored by Jaime Pérez's avatar Jaime Pérez
Browse files

bugfix: Avoid masked errors in PHP 7.

ParseError errors in PHP 7 have a code of 0, which will always be masked. Avoid that by forcing error codes of 0 to be E_ERROR instead.
parent ca03e7eb
No related branches found
No related tags found
No related merge requests found
...@@ -46,7 +46,8 @@ function SimpleSAML_exception_handler($exception) ...@@ -46,7 +46,8 @@ function SimpleSAML_exception_handler($exception)
$e->show(); $e->show();
} else { } else {
if (class_exists('Error') && $exception instanceof Error) { if (class_exists('Error') && $exception instanceof Error) {
$errno = $exception->getCode(); $code = $exception->getCode();
$errno = ($code > 0) ? $code : E_ERROR;
$errstr = $exception->getMessage(); $errstr = $exception->getMessage();
$errfile = $exception->getFile(); $errfile = $exception->getFile();
$errline = $exception->getLine(); $errline = $exception->getLine();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment