Skip to content

Commit

Permalink
Merge pull request doctrine-extensions#1991 from jarkt/v2.4.x
Browse files Browse the repository at this point in the history
Bugfix to load null value translations (doctrine-extensions#1990)
  • Loading branch information
AkenRoberts authored Feb 21, 2019
2 parents 113a5c0 + 4b5eadb commit c905d8b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,6 @@ a release.
---

## [Unreleased]
### Translatable
#### Fixed
- Bugfix to load null value translations (#1990)
2 changes: 1 addition & 1 deletion lib/Gedmo/Translatable/TranslatableListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ public function postLoad(EventArgs $args)
$is_translated = false;
foreach ((array) $result as $entry) {
if ($entry['field'] == $field) {
$translated = $entry['content'];
$translated = isset($entry['content']) ? $entry['content'] : null;
$is_translated = true;
break;
}
Expand Down

0 comments on commit c905d8b

Please sign in to comment.