Adding fix for Ticket #2738, fixes Nesting level too deep error when writing object in CakeSession in php 5.2+

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5286 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
phpnut 2007-06-16 23:51:12 +00:00
parent 9eb563d303
commit 1454a05ee3

View file

@ -362,7 +362,7 @@ class CakeSession extends Object {
trigger_error('Writing session key {' . $var . '}: ' . Debugger::exportVar($value), E_USER_NOTICE); trigger_error('Writing session key {' . $var . '}: ' . Debugger::exportVar($value), E_USER_NOTICE);
} }
$this->__overwrite($_SESSION, Set::insert($_SESSION, $var, $value)); $this->__overwrite($_SESSION, Set::insert($_SESSION, $var, $value));
return (Set::extract($_SESSION, $var) == $value); return (Set::extract($_SESSION, $var) === $value);
} }
/** /**
* Helper method to destroy invalid sessions. * Helper method to destroy invalid sessions.