diff --git a/src/Symfony/Component/ErrorRenderer/Resources/views/logs.html.php b/src/Symfony/Component/ErrorRenderer/Resources/views/logs.html.php index 5ee4e7292e..c866e06978 100644 --- a/src/Symfony/Component/ErrorRenderer/Resources/views/logs.html.php +++ b/src/Symfony/Component/ErrorRenderer/Resources/views/logs.html.php @@ -16,7 +16,10 @@ } elseif ($log['priority'] >= 300) { $status = 'warning'; } else { - $severity = $log['context']['exception']['severity'] ?? false; + $severity = 0; + if (($exception = $log['context']['exception'] ?? null) instanceof \ErrorException) { + $severity = $exception->getSeverity(); + } $status = E_DEPRECATED === $severity || E_USER_DEPRECATED === $severity ? 'warning' : 'normal'; } ?>