Commit 977eb97b authored by Côme Chilliet's avatar Côme Chilliet
Browse files

Fixes #5477 Destroy session in case of fatal error to avoid lock out

parent fb140ff0
......@@ -258,8 +258,8 @@ function gosaRaiseError($errno, $errstr, $errfile, $errline)
$error_collector_mailto .= $mailto_trace;
/* Flush in case of fatal errors */
set_error_handler('gosaRaiseError', E_WARNING | E_NOTICE | E_USER_ERROR | E_USER_WARNING | E_USER_NOTICE | E_STRICT);
if (preg_match('/^fatal/i', $errstr) || (PHP_ERROR_FATAL == 'TRUE')) {
session::destroy();
if (PHP_ERROR_FATAL == 'TRUE') {
$error_collector = str_replace('display: none;', '', $error_collector);
}
......@@ -267,6 +267,8 @@ function gosaRaiseError($errno, $errstr, $errfile, $errline)
flush();
exit;
}
set_error_handler('gosaRaiseError', E_WARNING | E_NOTICE | E_USER_ERROR | E_USER_WARNING | E_USER_NOTICE | E_STRICT);
}
/*!
......
Markdown is supported
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