From 53458317429616491ea91916f8af87f723d88a83 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Fri, 31 Jul 2015 11:04:51 +0200 Subject: [PATCH] SessionNamespace: Be less error-prone while calling array_search --- library/Icinga/Web/Session/SessionNamespace.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/library/Icinga/Web/Session/SessionNamespace.php b/library/Icinga/Web/Session/SessionNamespace.php index 281d09bea..bda22fd80 100644 --- a/library/Icinga/Web/Session/SessionNamespace.php +++ b/library/Icinga/Web/Session/SessionNamespace.php @@ -101,8 +101,8 @@ class SessionNamespace implements IteratorAggregate { $this->values[$key] = $value; - if (in_array($key, $this->removed)) { - unset($this->removed[array_search($key, $this->removed)]); + if (in_array($key, $this->removed, true)) { + unset($this->removed[array_search($key, $this->removed, true)]); } return $this; @@ -112,8 +112,8 @@ class SessionNamespace implements IteratorAggregate { $this->values[$key] = & $value; - if (in_array($key, $this->removed)) { - unset($this->removed[array_search($key, $this->removed)]); + if (in_array($key, $this->removed, true)) { + unset($this->removed[array_search($key, $this->removed, true)]); } return $this;