Skip to content

Commit fb48698

Browse files
committed
Ignore errors in libraries that are silenced with '@'
1 parent d02396b commit fb48698

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

includes/session.php

+4-1
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,10 @@
146146

147147
// Convert PHP errors into exceptions
148148
set_error_handler(function ($errno, $errstr, $errfile, $errline) {
149-
throw new ErrorException($errfile . ':' . $errline . ' ' . $errstr, $errno);
149+
// Ignore errors thar are silenced with '@'
150+
if (error_reporting() & $errno) {
151+
throw new ErrorException($errfile . ':' . $errline . ' ' . $errstr, $errno);
152+
}
150153
});
151154

152155
set_exception_handler(function (Throwable $ex) {

0 commit comments

Comments
 (0)