Skip to content
This repository has been archived by the owner on Jan 31, 2020. It is now read-only.

Commit

Permalink
Merge branch 'hotfix/105'
Browse files Browse the repository at this point in the history
Close #105
  • Loading branch information
weierophinney committed Jan 31, 2018
2 parents b5acadc + d24c685 commit aaebc1e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ All notable changes to this project will be documented in this file, in reverse
either set production INI values in your production `php.ini`, and/or always
pass your fully configured session manager to container instances you create.

- [#105](https://github.com/zendframework/zend-session/pull/105) fixes an edge
case whereby if the special `__ZF` session value is a non-array value,
initializing the session would result in errors.

## 2.8.3 - 2017-12-01

### Added
Expand Down
2 changes: 1 addition & 1 deletion src/Storage/AbstractSessionArrayStorage.php
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ public function setMetadata($key, $value, $overwriteArray = false)
);
}

if (! isset($_SESSION['__ZF'])) {
if (! isset($_SESSION['__ZF']) || ! is_array($_SESSION['__ZF'])) {
$_SESSION['__ZF'] = [];
}
if (isset($_SESSION['__ZF'][$key]) && is_array($value)) {
Expand Down

0 comments on commit aaebc1e

Please sign in to comment.