Skip to content

Commit

Permalink
existsInLocale should return the cached value
Browse files Browse the repository at this point in the history
we need boolean casting, cause prepopulation saves the ID instead of boolean values
  • Loading branch information
wernerkrauss committed Oct 3, 2018
1 parent 45c4a18 commit 394af85
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Extension/FluentVersionedExtension.php
Expand Up @@ -324,7 +324,7 @@ protected function isLocalisedInStage($stage, $locale = null)

// Check for a cached item in the full list of all objects. These are populated optimistically.
if (isset(static::$idsInLocaleCache[$locale][$table][$this->owner->ID])) {
return true;
return (bool) static::$idsInLocaleCache[$locale][$table][$this->owner->ID];
} elseif (!empty(static::$idsInLocaleCache[$locale][$table]['_complete'])) {
return false;
}
Expand Down

0 comments on commit 394af85

Please sign in to comment.