Check for exact matching session keys before splitting into path segments. Adds backwards-compatibility after commit f0a7159c

pull/88/head
Thomas Bruederli 12 years ago committed by Thomas Bruederli
parent d6cbdea04d
commit 8d7f8c8c79

@ -203,11 +203,16 @@ class rcube_session
if (is_array($a_oldvars)) {
// remove unset keys on oldvars
foreach ((array)$this->unsets as $var) {
if (isset($a_oldvars[$k])) {
unset($a_oldvars[$k]);
}
else {
$path = explode('.', $var);
$k = array_pop($path);
$node = &$this->get_node($path, $a_oldvars);
unset($node[$k]);
}
}
$newvars = $this->serialize(array_merge(
(array)$a_oldvars, (array)$this->unserialize($vars)));
@ -413,10 +418,15 @@ class rcube_session
$this->unsets[] = $var;
if (isset($_SESSION[$var])) {
unset($_SESSION[$var])
}
else {
$path = explode('.', $var);
$key = array_pop($path);
$node = &$this->get_node($path, $_SESSION);
unset($node[$key]);
}
return true;
}

Loading…
Cancel
Save