From 233f40cbebd595ffd91ddf291355f8a930a13777 Mon Sep 17 00:00:00 2001 From: bogdan Date: Wed, 2 Oct 2019 18:28:34 +0300 Subject: [PATCH] [HttpFoundation] Check if data passed to SessionBagProxy::initialize is an array --- Session/Storage/NativeSessionStorage.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Session/Storage/NativeSessionStorage.php b/Session/Storage/NativeSessionStorage.php index 4f1c30ef5..4c5873728 100644 --- a/Session/Storage/NativeSessionStorage.php +++ b/Session/Storage/NativeSessionStorage.php @@ -430,7 +430,7 @@ protected function loadSession(array &$session = null) foreach ($bags as $bag) { $key = $bag->getStorageKey(); - $session[$key] = isset($session[$key]) ? $session[$key] : []; + $session[$key] = isset($session[$key]) && \is_array($session[$key]) ? $session[$key] : []; $bag->initialize($session[$key]); }