[HttpFoundation] Check if data passed to SessionBagProxy::initialize is an array

This commit is contained in:
bogdan 2019-10-02 18:28:34 +03:00 committed by Nicolas Grekas
parent fb5f8fb96a
commit 38782bceff
1 changed files with 1 additions and 1 deletions

View File

@ -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]);
}