Skip to content

Commit 43323e7

Browse files
Merge branch '5.2' into 5.3
* 5.2: [DI] fix fixture [ErrorHandler] fix handling buffered SilencedErrorContext [HttpClient] fix Psr18Client when allow_url_fopen=0 [DependencyInjection] Add support of PHP enumerations [Cache] handle prefixed redis connections when clearing pools [Cache] fix eventual consistency when using RedisTagAwareAdapter with a cluster [Uid] Fix fromString() with low base58 values [Validator][Translation] Add ExpressionLanguageSyntax en and fr [HttpKernel] [HttpCache] Keep s-maxage=0 from ESI sub-responses Avoid broken action URL in text notification mail [Cache] Disable locking on Windows by default [DependencyInjection] Fix binding "iterable $foo" when using the PHP-DSL [Config] fix tracking default values that reference the parent class [DependencyInjection] fix accepted types on FactoryTrait::factory() [VarDumper] Fix tests for PHP 8.1 [Mailer] fix encoding of addresses using SmtpTransport [MonologBridge] Fix the server:log help --filter sample
2 parents 00cc5a7 + b0c9b02 commit 43323e7

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

Resources/views/logs.html.php

Lines 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';

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)