Skip to content

Commit

Permalink
Fix handling of NULLs in single subentities.
Browse files Browse the repository at this point in the history
  • Loading branch information
szeber committed Aug 18, 2016
1 parent 19275b7 commit da5d35a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ShoppinPal/Vend/DataObject/Entity/EntityDoAbstract.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public function __construct(array $data = [], $unknownPropertyHandling = self::U
}
$this->$propertyName = $tmpValue;
} else {
$this->$propertyName = new $className($value, $unknownPropertyHandling);
$this->$propertyName = null === $value ? null : new $className($value, $unknownPropertyHandling);
}
} else {
$this->$propertyName = $value;
Expand Down

0 comments on commit da5d35a

Please sign in to comment.