Skip to content

Commit

Permalink
Merge pull request #392 from jordisala1991/hotfix/trans-subscriber
Browse files Browse the repository at this point in the history
Only set locales on entities managed by knp translations
  • Loading branch information
AlucardleVash authored Nov 13, 2018
2 parents 212ecec + 74680ac commit 9cc036e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ORM/Translatable/TranslatableSubscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ private function setLocales(LifecycleEventArgs $eventArgs)
$entity = $eventArgs->getEntity();
$classMetadata = $em->getClassMetadata(get_class($entity));

if (!$this->getClassAnalyzer()->hasMethod($classMetadata->reflClass, 'setCurrentLocale')) {
if (!$this->isTranslatable($classMetadata)) {
return;
}

Expand Down

0 comments on commit 9cc036e

Please sign in to comment.