Skip to content

Commit

Permalink
Fix array merge
Browse files Browse the repository at this point in the history
The plus operator doesn’t merge in falsy values…
  • Loading branch information
chillu committed Dec 20, 2016
1 parent 467e2d7 commit a306371
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/Util/CaseInsensitiveFieldAccessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,12 @@ public function getValue(ViewableData $object, $fieldName, $opts = [])
public function setValue(ViewableData $object, $fieldName, $value, $opts = [])
{
$opts = $opts ?: [];
$opts = [
self::HAS_METHOD => true,
self::HAS_FIELD => true,
self::HAS_SETTER => true,
self::DATAOBJECT => true,
] + $opts;
$opts = array_merge([
self::HAS_METHOD => true,
self::HAS_FIELD => true,
self::HAS_SETTER => true,
self::DATAOBJECT => true,
], $opts);

$objectFieldName = $this->getObjectFieldName($object, $fieldName, $opts);

Expand Down

0 comments on commit a306371

Please sign in to comment.