Skip to content

Commit

Permalink
#106741 - ezsystems/ezplatform-automated-translation
Browse files Browse the repository at this point in the history
Correction de l'erreur :

> Translator::getTranslatedContent(): Argument #1 ($from) must be of type string, null given

Si demande de traduction automatique sans langue source.
  • Loading branch information
RemyNovactive committed Oct 10, 2023
1 parent 4f7b317 commit 4495140
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions bundle/EventListener/ContentProxyTranslateListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 4495140

Please sign in to comment.