check if a $_SESSION entry exists before we try to remove it

This commit is contained in:
Robin Appelman 2013-12-11 12:59:48 +01:00
parent a36bf5c2b5
commit 5c7a08aab4
1 changed files with 3 additions and 1 deletions

View File

@ -35,7 +35,9 @@ class Internal extends Memory {
*/
public function remove($key) {
// also remove it from $_SESSION to prevent re-setting the old value during the merge
unset($_SESSION[$key]);
if (isset($_SESSION[$key])) {
unset($_SESSION[$key]);
}
parent::remove($key);
}