From 44951408189759cecc66ebbe4d9e4e6acce01399 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20LIMOUZIN?= Date: Tue, 10 Oct 2023 11:11:28 +0200 Subject: [PATCH] #106741 - ezsystems/ezplatform-automated-translation Correction de l'erreur : > Translator::getTranslatedContent(): Argument #1 ($from) must be of type string, null given Si demande de traduction automatique sans langue source. --- bundle/EventListener/ContentProxyTranslateListener.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bundle/EventListener/ContentProxyTranslateListener.php b/bundle/EventListener/ContentProxyTranslateListener.php index 3b2973a..10c5f1f 100644 --- a/bundle/EventListener/ContentProxyTranslateListener.php +++ b/bundle/EventListener/ContentProxyTranslateListener.php @@ -70,6 +70,9 @@ public function translate(ContentProxyTranslateEvent $event): void $fromLanguageCode = $event->getFromLanguageCode(); $toLanguageCode = $event->getToLanguageCode(); + if (!($fromLanguageCode && $toLanguageCode)) { + return; + } $contentDraft = $this->translator->getTranslatedContent( $fromLanguageCode,