From f49e3f5bb60209856957d3b5d5e18a021419eb1b Mon Sep 17 00:00:00 2001 From: Bartek Wajda Date: Mon, 30 Jan 2023 12:04:20 +0100 Subject: [PATCH] IBX-4796: Applied review remark --- src/lib/Form/Processor/ContentFormProcessor.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/Form/Processor/ContentFormProcessor.php b/src/lib/Form/Processor/ContentFormProcessor.php index b172621..849871a 100644 --- a/src/lib/Form/Processor/ContentFormProcessor.php +++ b/src/lib/Form/Processor/ContentFormProcessor.php @@ -126,7 +126,7 @@ public function processPublish(FormActionEvent $event) $event->setPayload('content', $content); $event->setPayload('is_new', $draft->contentInfo->isDraft()); - $locationId = !empty($referrerLocation) ? $referrerLocation->id : $content->contentInfo->mainLocationId; + $locationId = $referrerLocation !== null ? $referrerLocation->id : $content->contentInfo->mainLocationId; $redirectUrl = $form['redirectUrlAfterPublish']->getData() ?: $this->router->generate( '_ez_content_view', [