If session_save_path() returns '', use sys_get_temp_dir()

resolves #8994
This commit is contained in:
Alexander A. Klimov 2015-04-22 17:25:51 +02:00
parent 1daecbbca0
commit 9cd7765d9e
1 changed files with 1 additions and 1 deletions

View File

@ -77,7 +77,7 @@ class PhpSession extends Session
}
}
$sessionSavePath = session_save_path();
$sessionSavePath = session_save_path() ?: sys_get_temp_dir();
if (session_module_name() === 'files' && !is_writable($sessionSavePath)) {
throw new ConfigurationError("Can't save session, path '$sessionSavePath' is not writable.");
}