Skip to content

Commit

Permalink
Merge pull request #15 from dotkernel/develop
Browse files Browse the repository at this point in the history
fix previous release
  • Loading branch information
n3vrax authored Sep 15, 2017
2 parents c334892 + 5a22d88 commit e5b1094
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
## 0.4.4 - 2017-09-15

### Changed
* Nothing

### Added
* Nothing

### Deprecated
* Nothing

### Removed
* Nothing

### Fixed
* Quick fixed previous release


## 0.4.3 - 2017-09-15

### Changed
Expand Down
6 changes: 3 additions & 3 deletions src/Mapper/AbstractDbMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,8 @@ public function get($primaryKey, array $options = [])
public function save(EntityInterface $entity, array $options = [])
{
$options += [
'atomic' => true
'atomic' => true,
'force_nulls' => false,
];

if ($options['atomic']) {
Expand Down Expand Up @@ -313,8 +314,7 @@ protected function processSave(EntityInterface $entity, array $options)
return $event->last();
}

$forceNulls = (bool) $options['force_nulls'] ?? false;
if (!$forceNulls) {
if (isset($options['force_nulls']) && $options['force_nulls'] === false) {
$data = array_filter($data);
}

Expand Down

0 comments on commit e5b1094

Please sign in to comment.