From 30a6a9b697c4964a82b46e5141a2c14aece36411 Mon Sep 17 00:00:00 2001 From: Sami Mazouz Date: Mon, 21 Oct 2024 19:10:57 +0100 Subject: [PATCH] chore: ignore deprecation errors in prod (#4072) --- framework/core/src/Foundation/Site.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/framework/core/src/Foundation/Site.php b/framework/core/src/Foundation/Site.php index 62308a01c..0cc0043b0 100644 --- a/framework/core/src/Foundation/Site.php +++ b/framework/core/src/Foundation/Site.php @@ -31,8 +31,16 @@ class Site ); } + $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)); }