diff --git a/framework/core/src/Foundation/Site.php b/framework/core/src/Foundation/Site.php index 62308a01c4..0cc0043b05 100644 --- a/framework/core/src/Foundation/Site.php +++ b/framework/core/src/Foundation/Site.php @@ -31,8 +31,16 @@ public static function fromPaths(array $paths): SiteInterface ); } + $config = static::loadConfig($paths->base); + + ini_set('display_errors', 0); + + if (! $config->inDebugMode() && function_exists('error_reporting')) { + error_reporting(E_ALL & ~E_DEPRECATED & ~E_USER_DEPRECATED); + } + return ( - new InstalledSite($paths, static::loadConfig($paths->base)) + new InstalledSite($paths, $config) )->extendWith(static::loadExtenders($paths->base)); }