mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
Finished retro-fitting CakeSession::del() (Ticket #2163)
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4552 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
105b17799a
commit
2650c3a582
1 changed files with 6 additions and 8 deletions
|
@ -201,15 +201,13 @@ class CakeSession extends Object {
|
||||||
*/
|
*/
|
||||||
function del($name) {
|
function del($name) {
|
||||||
if ($this->check($name)) {
|
if ($this->check($name)) {
|
||||||
$var = $this->__sessionVarNames($name);
|
if ($var = $this->__validateKeys($name)) {
|
||||||
if (empty($var)) {
|
if (in_array($var, $this->watchKeys)) {
|
||||||
return false;
|
trigger_error('Deleting session key {' . $var . '}', E_USER_NOTICE);
|
||||||
|
}
|
||||||
|
$this->__overwrite($_SESSION, Set::remove($_SESSION, $var));
|
||||||
|
return ($this->check($var) == false);
|
||||||
}
|
}
|
||||||
if (in_array($var, $this->watchKeys)) {
|
|
||||||
trigger_error('Deleting session key {' . $var . '}', E_USER_NOTICE);
|
|
||||||
}
|
|
||||||
$this->__overwrite($_SESSION, Set::remove($_SESSION, $var));
|
|
||||||
return ($this->check($var) == false);
|
|
||||||
}
|
}
|
||||||
$this->__setError(2, "$name doesn't exist");
|
$this->__setError(2, "$name doesn't exist");
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Add table
Reference in a new issue