We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 674c0a7 + c2e9c94 commit 2ada9f3Copy full SHA for 2ada9f3
EventListener/ReplaceImageListener.php
@@ -59,11 +59,11 @@ public function onKernelResponse(ResponseEvent $event)
59
// Status code is not set by the exception controller but only by the
60
// kernel at the very end.
61
// So lets use the status code from the flatten exception instead.
62
- // Unless it comes from a fatal error handler
63
- if ($exception instanceof \Error) {
64
- $statusCode = $exception->getCode();
65
- } else {
+ // Unless it comes from a fatal error handler or exception base class
+ if (method_exists($exception, 'getStatusCode')) {
66
$statusCode = $exception->getStatusCode();
+ } else {
+ $statusCode = $exception->getCode();
67
}
68
69
$dir = $this->getGifDir($statusCode);
0 commit comments