Skip to content

Commit

Permalink
Merge pull request #18 from wearemarketing/hotfix/auto-route-listener…
Browse files Browse the repository at this point in the history
…-bug

Fix listener bug when persisting multiple translations at once
  • Loading branch information
juanjomb authored Dec 20, 2018
2 parents 0c6e7e5 + 48133ec commit 686f9da
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Doctrine/Orm/AutoRouteListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ private function parseUpdateEntities(array $inEntities)
if ($this->isAutoRouteable($entity)) {
$outEntities[] = $entity;
} else if ($entity instanceof TranslationInterface && $translatable = $entity->getTranslatable()) {
if (false === in_array($translatable, $inEntities, true) && $this->isAutoRouteable($translatable)) {
if (false === in_array($translatable, $outEntities, true) && $this->isAutoRouteable($translatable)) {
$outEntities[] = $translatable;
}
}
Expand Down

0 comments on commit 686f9da

Please sign in to comment.