Session: Be less error-prone while calling array_search

This commit is contained in:
Johannes Meyer 2015-07-31 11:04:43 +02:00
parent 24cb123f47
commit 449a19c3a3
1 changed files with 2 additions and 2 deletions

View File

@ -70,8 +70,8 @@ abstract class Session extends SessionNamespace
public function getNamespace($identifier)
{
if (!isset($this->namespaces[$identifier])) {
if (in_array($identifier, $this->removedNamespaces)) {
unset($this->removedNamespaces[array_search($identifier, $this->removedNamespaces)]);
if (in_array($identifier, $this->removedNamespaces, true)) {
unset($this->removedNamespaces[array_search($identifier, $this->removedNamespaces, true)]);
}
$this->namespaces[$identifier] = new SessionNamespace();