8000 [ErrorHandler] fix handling buffered SilencedErrorContext · symfony/symfony@6c44c5f · GitHub
[go: up one dir, main page]

Skip to content

Commit 6c44c5f

Browse files
[ErrorHandler] fix handling buffered SilencedErrorContext
1 parent ffb0d2d commit 6c44c5f

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/Symfony/Component/ErrorHandler/ThrowableUtils.php

Lines 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