Also autocreate session folder in debug mode

This commit is contained in:
euromark 2014-12-27 20:34:47 +01:00
parent 843ddd6d36
commit 5aff618109

View file

@ -494,7 +494,12 @@ class CakeSession {
if (!empty($sessionConfig['handler'])) {
$sessionConfig['ini']['session.save_handler'] = 'user';
} elseif (!empty($sessionConfig['session.save_path']) && Configure::read('debug')) {
if (!is_dir($sessionConfig['session.save_path'])) {
mkdir($sessionConfig['session.save_path'], 0775, true);
}
}
if (!isset($sessionConfig['ini']['session.gc_maxlifetime'])) {
$sessionConfig['ini']['session.gc_maxlifetime'] = $sessionConfig['timeout'] * 60;
}