1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-08-07 05:36:45 +02:00

Merge pull request #1241 from gmponos/error_handler

Error handler strict comparison fix
This commit is contained in:
Jordi Boggiano
2018-12-11 07:45:54 +01:00
committed by GitHub

View File

@@ -58,9 +58,6 @@ class ErrorHandler
*/
public static function register(LoggerInterface $logger, $errorLevelMap = [], $exceptionLevelMap = [], $fatalLevel = null): self
{
//Forces the autoloader to run for LogLevel. Fixes an autoload issue at compile-time on PHP5.3. See https://github.com/Seldaek/monolog/pull/929
class_exists('\\Psr\\Log\\LogLevel', true);
$handler = new static($logger);
if ($errorLevelMap !== false) {
$handler->registerErrorHandler($errorLevelMap);
@@ -150,6 +147,7 @@ class ErrorHandler
/**
* @private
* @param \Exception $e
*/
public function handleException($e)
{
@@ -171,7 +169,7 @@ class ErrorHandler
call_user_func($this->previousExceptionHandler, $e);
}
if (!headers_sent() && ini_get('display_errors') === 0) {
if (!headers_sent() && !ini_get('display_errors')) {
http_response_code(500);
}