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