diff --git a/src/Form/EventListener/TranslationsListener.php b/src/Form/EventListener/TranslationsListener.php index bfba6d5..23e9cdb 100644 --- a/src/Form/EventListener/TranslationsListener.php +++ b/src/Form/EventListener/TranslationsListener.php @@ -71,7 +71,9 @@ public function submit(FormEvent $event): void foreach ($data as $locale => $translation) { // Remove useless Translation object - if (empty($translation)) { + if ((method_exists($translation, 'isEmpty') && $translation->isEmpty()) // Knp + || empty($translation) // Default + ) { $data->removeElement($translation); continue; }