mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-28 08:14:03 +02:00
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…
x
Reference in New Issue
Block a user