Merge pull request #1320 from HB9HIL/php84

PHP 8.4 readiness
This commit is contained in:
Fabian Berg
2024-12-16 15:37:38 +01:00
committed by GitHub
2 changed files with 11 additions and 2 deletions

View File

@@ -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';
}
}
// --------------------------------------------------------------------

View File

@@ -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);
}
}
}