Skip to content

Commit 233f40c

Browse files
mynameisbogdannicolas-grekas
authored andcommitted
[HttpFoundation] Check if data passed to SessionBagProxy::initialize is an array
1 parent 35ffbbf commit 233f40c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Session/Storage/NativeSessionStorage.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ protected function loadSession(array &$session = null)
430430

431431
foreach ($bags as $bag) {
432432
$key = $bag->getStorageKey();
433-
$session[$key] = isset($session[$key]) ? $session[$key] : [];
433+
$session[$key] = isset($session[$key]) && \is_array($session[$key]) ? $session[$key] : [];
434434
$bag->initialize($session[$key]);
435435
}
436436

0 commit comments

Comments
 (0)