Skip to content

Commit

Permalink
Merge branch 'hotfix/issue-92'
Browse files Browse the repository at this point in the history
Closes #93
Fixes #92
  • Loading branch information
akrabat committed Apr 6, 2019
2 parents 12574f7 + ecd1f26 commit 9c0e77a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Guard.php
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ public function validateStorage()
if (!isset($_SESSION)) {
throw new RuntimeException('CSRF middleware failed. Session not found.');
}
if (!array_key_exists($this->prefix, $_SESSION)) {
if (!array_key_exists($this->prefix, $_SESSION) || !\is_array($_SESSION[$this->prefix])) {
$_SESSION[$this->prefix] = [];
}
$this->storage = &$_SESSION[$this->prefix];
Expand Down

0 comments on commit 9c0e77a

Please sign in to comment.