From 38782bceff3a063193f9e988205ec919e7819c33 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 --- .../HttpFoundation/Session/Storage/NativeSessionStorage.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.php b/src/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.php index 4f1c30ef52..4c5873728a 100644 --- a/src/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.php +++ b/src/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.php @@ -430,7 +430,7 @@ class NativeSessionStorage implements SessionStorageInterface 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]); }