mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-18 18:46: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) {
|
||||
if ($this->check($name)) {
|
||||
$var = $this->__sessionVarNames($name);
|
||||
if (empty($var)) {
|
||||
return false;
|
||||
if ($var = $this->__validateKeys($name)) {
|
||||
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);
|
||||
}
|
||||
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");
|
||||
return false;
|
||||
|
|
Loading…
Add table
Reference in a new issue