SessionNamespace: Be less error-prone while calling array_search
This commit is contained in:
parent
449a19c3a3
commit
5345831742
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue