Skip to content

Commit

Permalink
KUN-9515 | (fix) nullable nodetranslation in slugtype
Browse files Browse the repository at this point in the history
  • Loading branch information
mart-insiders committed Jan 30, 2025
1 parent 91afd3e commit 4a582bc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Kunstmaan/NodeBundle/Form/Type/SlugType.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public function buildView(FormView $view, FormInterface $form, array $options)
$view->vars['prefix'] = '';
if ($parentNode !== null) {
$nodeTranslation = $parentNode->getNodeTranslation($nodeTranslation->getLang(), true);
$slug = $nodeTranslation->getSlugPart();
$slug = $nodeTranslation?->getSlugPart();
if (!empty($slug)) {
$slug = rtrim($slug, '/') . '/';
}
Expand Down

0 comments on commit 4a582bc

Please sign in to comment.