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

Commit

Permalink
Merge remote-tracking branch 'Maks3w/hotfix/ZF2-216'
Browse files Browse the repository at this point in the history
  • Loading branch information
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions src/Storage/ArrayStorage.php
Original file line number Diff line number Diff line change
Expand Up @@ -226,14 +226,6 @@ public function setMetadata($key, $value, $overwriteArray = false)
if (isset($this['__ZF'][$key]) && is_array($value)) {
if ($overwriteArray) {
$this['__ZF'][$key] = $value;
} elseif (null === $value) {
// unset($this['__ZF'][$key]) led to "indirect modification...
// has no effect" errors, so explicitly pulling array and
// unsetting key.
$array = $this['__ZF'];
unset($array[$key]);
$this['__ZF'] = $array;
unset($array);
} else {
$this['__ZF'][$key] = array_replace_recursive($this['__ZF'][$key], $value);
}
Expand All @@ -250,6 +242,7 @@ public function setMetadata($key, $value, $overwriteArray = false)
$this['__ZF'][$key] = $value;
}
}

return $this;
}

Expand Down

0 comments on commit 7e217f4

Please sign in to comment.