Commit 181b2e2b authored by Marcin Haba's avatar Marcin Haba
Browse files

baculum: Fix #2653 PHP warning about wrong array_key_exists() parameter in session record

parent 824f2cae
......@@ -89,7 +89,8 @@ class SessionRecord extends CommonModule implements SessionItem {
$fp = fopen($sessfile, 'r');
if (flock($fp, LOCK_SH, $wouldblock)) {
$content = file_get_contents($sessfile);
$GLOBALS['sess'] = unserialize($content);
$ucont = unserialize($content);
$GLOBALS['sess'] = is_array($ucont) ? $ucont : array();
flock($fp, LOCK_UN);
} else {
$emsg = 'Unable to shared lock ' . $sessfile;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment