mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 02:56:15 +00:00
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:
parent
26c7262acc
commit
c128505a2c
1 changed files with 4 additions and 2 deletions
|
@ -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]])) {
|
||||
|
|
Loading…
Add table
Reference in a new issue