function SimpleSAML_error_handler($errno, $errstr, $errfile = NULL, $errline = 0, $errcontext = NULL) { if (!class_exists('SimpleSAML_Logger')) { /* We are probably logging a deprecation-warning during parsing. * Unfortunately, the autoloader is disabled at this point, * so we should stop here. * * See PHP bug: https://bugs.php.net/bug.php?id=47987 */ return FALSE; } if ($errno & SimpleSAML_Utilities::$logMask || !($errno & error_reporting())) { /* Masked error. */ return FALSE; } static $limit = 5; $limit -= 1; if ($limit < 0) { /* We have reached the limit in the number of backtraces we will log. */ return FALSE; } /* Show an error with a full backtrace. */ $e = new SimpleSAML_Error_Exception('Error ' . $errno . ' - ' . $errstr); $e->logError(); /* Resume normal error processing. */ return FALSE; }
function SimpleSAML_error_handler($errno, $errstr, $errfile = null, $errline = 0, $errcontext = null) { if (!class_exists('SimpleSAML\\Logger')) { /* We are probably logging a deprecation-warning during parsing. Unfortunately, the autoloader is disabled at * this point, so we should stop here. * * See PHP bug: https://bugs.php.net/bug.php?id=47987 */ return false; } if (SimpleSAML\Logger::isErrorMasked($errno)) { // masked error return false; } static $limit = 5; $limit -= 1; if ($limit < 0) { // we have reached the limit in the number of backtraces we will log return false; } // show an error with a full backtrace $e = new SimpleSAML_Error_Exception('Error ' . $errno . ' - ' . $errstr); $e->logError(); // resume normal error processing return false; }
function SimpleSAML_error_handler($errno, $errstr, $errfile = NULL, $errline = 0, $errcontext = NULL) { if ($errno & SimpleSAML_Utilities::$logMask) { /* Masked error. */ return FALSE; } static $limit = 5; $limit -= 1; if ($limit < 0) { /* We have reached the limit in the number of backtraces we will log. */ return FALSE; } /* Show an error with a full backtrace. */ $e = new SimpleSAML_Error_Exception('Error ' . $errno . ' - ' . $errstr); $e->logError(); /* Resume normal error processing. */ return FALSE; }