10000 [ErrorRenderer] fix Cannot use object of type ErrorException as array… · symfony/symfony@063dc78 · GitHub
[go: up one dir, main page]

Skip to content

Commit 063dc78

Browse files
k0d3r1sfabpot
authored andcommitted
[ErrorRenderer] fix Cannot use object of type ErrorException as array exception #33631
1 parent 1efae63 commit 063dc78

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Symfony/Component/ErrorRenderer/Resources/views/logs.html.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,10 @@
1616
} elseif ($log['priority'] >= 300) {
1717
$status = 'warning';
1818
} else {
19-
$severity = $log['context']['exception']['severity'] ?? false;
19+
$severity = 0;
20+
if (($exception = $log['context']['exception'] ?? null) instanceof \ErrorException) {
21+
$severity = $exception->getSeverity();
22+
}
2023
$status = E_DEPRECATED === $severity || E_USER_DEPRECATED === $severity ? 'warning' : 'normal';
2124
} ?>
2225
<tr class="status-<?= $status; ?>" data-filter-level="<?= strtolower($this->escape($log['priorityName'])); ?>"<?php if ($channelIsDefined) { ?> data-filter-channel="<?= $this->escape($log['channel']); ?>"<?php } ?>>

0 commit comments

Comments
 (0)
0