From 7dd9dbf28d07afc1d261a50cf581d4d9a579d66b Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Thu, 27 Jun 2019 15:32:52 +0200 Subject: [PATCH] [ErrorHandler] made IDEs and static analysis tools happy --- .../Component/ErrorCatcher/ErrorRenderer/ErrorRenderer.php | 2 +- src/Symfony/Component/ErrorCatcher/ExceptionHandler.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Component/ErrorCatcher/ErrorRenderer/ErrorRenderer.php b/src/Symfony/Component/ErrorCatcher/ErrorRenderer/ErrorRenderer.php index 76b823fb41..1d326bde88 100644 --- a/src/Symfony/Component/ErrorCatcher/ErrorRenderer/ErrorRenderer.php +++ b/src/Symfony/Component/ErrorCatcher/ErrorRenderer/ErrorRenderer.php @@ -62,7 +62,7 @@ class ErrorRenderer throw new ErrorRendererNotFoundException(sprintf('No error renderer found for format "%s".', $format)); } - if (!$exception instanceof FlattenException) { + if ($exception instanceof \Exception) { $exception = FlattenException::create($exception); } diff --git a/src/Symfony/Component/ErrorCatcher/ExceptionHandler.php b/src/Symfony/Component/ErrorCatcher/ExceptionHandler.php index 63b36d29d4..0e456d6a84 100644 --- a/src/Symfony/Component/ErrorCatcher/ExceptionHandler.php +++ b/src/Symfony/Component/ErrorCatcher/ExceptionHandler.php @@ -160,7 +160,7 @@ class ExceptionHandler */ public function sendPhpResponse($exception) { - if (!$exception instanceof FlattenException) { + if ($exception instanceof \Exception) { $exception = FlattenException::create($exception); }