Adding read() into CookieComponent::del() so that values will always be populated. Reversing change from [7725]. Fixes #5563

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7729 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
mark_story 2008-10-10 17:24:10 +00:00
parent 26c7262acc
commit c128505a2c

View file

@ -274,13 +274,15 @@ class CookieComponent extends Object {
* @access public
*/
function del($key) {
if (empty($this->__values)) {
$this->read();
}
$name = $this->__cookieVarNames($key);
if (count($name) > 1) {
if (isset($this->__values[$name[0]])) {
$this->__delete("[".$name[0]."][".$name[1]."]");
unset($this->__values[$name[0]][$name[1]]);
}
$this->__delete("[".$name[0]."][".$name[1]."]");
} else {
if (isset($this->__values[$name[0]])) {
if (is_array($this->__values[$name[0]])) {