Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 92132b9

Browse filesBrowse files
[ErrorHandler] fix handling buffered SilencedErrorContext
1 parent ffb0d2d commit 92132b9
Copy full SHA for 92132b9

File tree

2 files changed

+8
-3
lines changed
Filter options

2 files changed

+8
-3
lines changed

‎src/Symfony/Component/ErrorHandler/Resources/views/logs.html.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/ErrorHandler/Resources/views/logs.html.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
$status = 'warning';
1818
} else {
1919
$severity = 0;
20-
if (($exception = $log['context']['exception'] ?? null) instanceof \ErrorException) {
20+
if (($exception = $log['context']['exception'] ?? null) instanceof \ErrorException || $exception instanceof \Symfony\Component\Errorhandler\Exception\SilencedErrorContext) {
2121
$severity = $exception->getSeverity();
2222
}
2323
$status = \E_DEPRECATED === $severity || \E_USER_DEPRECATED === $severity ? 'warning' : 'normal';

‎src/Symfony/Component/ErrorHandler/ThrowableUtils.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/ErrorHandler/ThrowableUtils.php
+7-2Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,19 @@
1111

1212
namespace Symfony\Component\ErrorHandler;
1313

14+
use Symfony\Component\ErrorHandler\Exception\SilencedErrorContext;
15+
1416
/**
1517
* @internal
1618
*/
1719
class ThrowableUtils
1820
{
19-
public static function getSeverity(\Throwable $throwable): int
21+
/**
22+
* @param SilencedErrorContext|\Throwable
23+
*/
24+
public static function getSeverity($throwable): int
2025
{
21-
if ($throwable instanceof \ErrorException) {
26+
if ($throwable instanceof \ErrorException || $throwable instanceof SilencedErrorContext) {
2227
return $throwable->getSeverity();
2328
}
2429

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.