SessionNamespace: Be less error-prone while calling array_search

This commit is contained in:
Johannes Meyer 2015-07-31 11:04:51 +02:00
parent 449a19c3a3
commit 5345831742
1 changed files with 4 additions and 4 deletions

View File

@ -101,8 +101,8 @@ class SessionNamespace implements IteratorAggregate
{ {
$this->values[$key] = $value; $this->values[$key] = $value;
if (in_array($key, $this->removed)) { if (in_array($key, $this->removed, true)) {
unset($this->removed[array_search($key, $this->removed)]); unset($this->removed[array_search($key, $this->removed, true)]);
} }
return $this; return $this;
@ -112,8 +112,8 @@ class SessionNamespace implements IteratorAggregate
{ {
$this->values[$key] = & $value; $this->values[$key] = & $value;
if (in_array($key, $this->removed)) { if (in_array($key, $this->removed, true)) {
unset($this->removed[array_search($key, $this->removed)]); unset($this->removed[array_search($key, $this->removed, true)]);
} }
return $this; return $this;