diff --git a/framework/core/src/Foundation/Site.php b/framework/core/src/Foundation/Site.php index 2d04780148..365af4e212 100644 --- a/framework/core/src/Foundation/Site.php +++ b/framework/core/src/Foundation/Site.php @@ -31,12 +31,10 @@ public static function fromPaths(array $paths): SiteInterface $config = static::loadConfig($paths->base); - if (! $config->inDebugMode()) { - ini_set('display_errors', 0); + ini_set('display_errors', 0); - if (function_exists('error_reporting')) { - error_reporting(E_ALL & ~E_DEPRECATED & ~E_USER_DEPRECATED); - } + if (! $config->inDebugMode() && function_exists('error_reporting')) { + error_reporting(E_ALL & ~E_DEPRECATED & ~E_USER_DEPRECATED); } return (