mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
When the PHP version is 7.2 or higher ini_set('session.save_handler', 'user')
can't be executed, so delete.
This commit is contained in:
parent
701519c637
commit
f4315d8ba4
1 changed files with 6 additions and 0 deletions
|
@ -552,6 +552,12 @@ class CakeSession {
|
|||
|
||||
if (!empty($sessionConfig['handler'])) {
|
||||
$sessionConfig['ini']['session.save_handler'] = 'user';
|
||||
|
||||
// In PHP7.2.0+ session.save_handler can't be set to 'user' by the user.
|
||||
// https://github.com/php/php-src/commit/a93a51c3bf4ea1638ce0adc4a899cb93531b9f0d
|
||||
if (version_compare(PHP_VERSION, '7.2.0', '>=')) {
|
||||
unset($sessionConfig['ini']['session.save_handler']);
|
||||
}
|
||||
} elseif (!empty($sessionConfig['session.save_path']) && Configure::read('debug')) {
|
||||
if (!is_dir($sessionConfig['session.save_path'])) {
|
||||
mkdir($sessionConfig['session.save_path'], 0775, true);
|
||||
|
|
Loading…
Reference in a new issue