From 8a57e2ccb5cf44a12d0a04fd67185c58e64d03bf Mon Sep 17 00:00:00 2001 From: HB9HIL Date: Thu, 5 Dec 2024 10:09:20 +0100 Subject: [PATCH] fix(exceptions): disable E_STRICT from php8.4 and add E_DEPRECATED constants --- system/core/Exceptions.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/system/core/Exceptions.php b/system/core/Exceptions.php index 92c635f97..1f79f055d 100644 --- a/system/core/Exceptions.php +++ b/system/core/Exceptions.php @@ -69,10 +69,11 @@ class CI_Exceptions { E_CORE_WARNING => 'Core Warning', E_COMPILE_ERROR => 'Compile Error', E_COMPILE_WARNING => 'Compile Warning', + E_DEPRECATED => 'Deprecated', E_USER_ERROR => 'User Error', E_USER_WARNING => 'User Warning', E_USER_NOTICE => 'User Notice', - E_STRICT => 'Runtime Notice' + E_USER_DEPRECATED => 'User Deprecated', ); /** @@ -84,6 +85,10 @@ class CI_Exceptions { { $this->ob_level = ob_get_level(); // Note: Do not log messages from this constructor. + + if (PHP_VERSION_ID >= 804000) { + $this->levels[E_STRICT] = 'Strict'; + } } // --------------------------------------------------------------------