Skip to content

Commit

Permalink
Allow translations of 0.
Browse files Browse the repository at this point in the history
When a translation is empty, unset the field, as it could be set to
null.
  • Loading branch information
markstory committed Jul 11, 2014
1 parent 5489813 commit b52a308
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Model/Behavior/TranslateBehavior.php
Expand Up @@ -286,7 +286,8 @@ protected function _rowMapper($results, $locale) {
$name = $field . '_translation';
$translation = $row->get($name);

if (!$translation) {
if ($translation === null || $translation === false) {
$row->unsetProperty($name);
continue;
}

Expand Down

0 comments on commit b52a308

Please sign in to comment.