diff --git a/src/Twig/EventSubscriber/ProductFormComponentSubscriber.php b/src/Twig/EventSubscriber/ProductFormComponentSubscriber.php index 6a41daa..e78f067 100644 --- a/src/Twig/EventSubscriber/ProductFormComponentSubscriber.php +++ b/src/Twig/EventSubscriber/ProductFormComponentSubscriber.php @@ -45,7 +45,7 @@ public function onPreRender(PreRenderEvent $event): void return; } - $addAutomaticRedirect = $vars['form']->children['translations']->children[$localeCode]->children['addAutomaticRedirect']; + $addAutomaticRedirect = $vars['form']->children['translations']->children[$localeCode]->children['addAutomaticRedirect'] ?? null; if (!$addAutomaticRedirect instanceof FormView) { return; } diff --git a/src/Twig/EventSubscriber/TaxonFormComponentSubscriber.php b/src/Twig/EventSubscriber/TaxonFormComponentSubscriber.php index 17edbab..d98ef7c 100644 --- a/src/Twig/EventSubscriber/TaxonFormComponentSubscriber.php +++ b/src/Twig/EventSubscriber/TaxonFormComponentSubscriber.php @@ -45,7 +45,7 @@ public function onPreRender(PreRenderEvent $event): void return; } - $addAutomaticRedirect = $vars['form']->children['translations']->children[$localeCode]->children['addAutomaticRedirect']; + $addAutomaticRedirect = $vars['form']->children['translations']->children[$localeCode]->children['addAutomaticRedirect'] ?? null; if (!$addAutomaticRedirect instanceof FormView) { return; }