From 5dab62d55107ee50d98a483e0712a757eacb47ea Mon Sep 17 00:00:00 2001 From: michalsn Date: Mon, 9 Dec 2024 13:35:55 +0100 Subject: [PATCH] move isDisplayErrorsEnabled() to BaseExceptionHandler class for reuse --- system/Debug/BaseExceptionHandler.php | 12 ++++++++++++ system/Debug/ExceptionHandler.php | 12 ------------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/system/Debug/BaseExceptionHandler.php b/system/Debug/BaseExceptionHandler.php index 4305265d2d2c..cc2200b7a440 100644 --- a/system/Debug/BaseExceptionHandler.php +++ b/system/Debug/BaseExceptionHandler.php @@ -268,4 +268,16 @@ protected function render(Throwable $exception, int $statusCode, $viewFile = nul return ob_get_clean(); })(); } + + /** + * Whether the PHP display_errors setting is enabled. + */ + protected function isDisplayErrorsEnabled(): bool + { + return in_array( + strtolower(ini_get('display_errors')), + ['1', 'true', 'on', 'yes'], + true + ); + } } diff --git a/system/Debug/ExceptionHandler.php b/system/Debug/ExceptionHandler.php index 8d495402a23d..415226108f62 100644 --- a/system/Debug/ExceptionHandler.php +++ b/system/Debug/ExceptionHandler.php @@ -152,16 +152,4 @@ protected function determineView( return $view; } - - /** - * Whether the PHP display_errors setting is enabled. - */ - private function isDisplayErrorsEnabled(): bool - { - return in_array( - strtolower(ini_get('display_errors')), - ['1', 'true', 'on', 'yes'], - true - ); - } }