diff --git a/Form/EventListener/TranslationCollectionFormListener.php b/Form/EventListener/TranslationCollectionFormListener.php index 1878469..aba4224 100644 --- a/Form/EventListener/TranslationCollectionFormListener.php +++ b/Form/EventListener/TranslationCollectionFormListener.php @@ -81,8 +81,7 @@ class TranslationCollectionFormListener implements EventSubscriberInterface if (method_exists($rootData, $addFunction)) { $foundData = true; break; - } elseif ($currentForm->hasParent()) { - $currentForm = $currentForm->getParent(); + } elseif (null != ($currentForm = $currentForm->getParent())) { $rootData = $currentForm->getData(); } else { break;