From 9f43737cd882c14d96f216f6b9eee785161a079d Mon Sep 17 00:00:00 2001 From: HB9HIL Date: Thu, 5 Dec 2024 10:25:43 +0100 Subject: [PATCH] fix[session]: supress the deprecation warning from php8.4 and above --- system/libraries/Session/Session.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/system/libraries/Session/Session.php b/system/libraries/Session/Session.php index 4948ead2f..6294f5656 100644 --- a/system/libraries/Session/Session.php +++ b/system/libraries/Session/Session.php @@ -356,7 +356,11 @@ class CI_Session { { // Add as many more characters as necessary to reach at least 160 bits $sid_length += (int) ceil((160 % $bits) / $bits_per_character); - ini_set('session.sid_length', $sid_length); + if (PHP_VERSION_ID >= 80400) { + @ini_set('session.sid_length', $sid_length); + } else { + ini_set('session.sid_length', $sid_length); + } } }