From 65e90f49971dbfcc807df6fc95df8fbac975a309 Mon Sep 17 00:00:00 2001 From: Sebastian Zoglowek Date: Fri, 29 Sep 2023 15:54:14 +0200 Subject: [PATCH] Fix php8 warnings --- contao/modules/ModuleRecommendationForm.php | 28 ++++++++++----------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/contao/modules/ModuleRecommendationForm.php b/contao/modules/ModuleRecommendationForm.php index d01759c..8fb4e95 100644 --- a/contao/modules/ModuleRecommendationForm.php +++ b/contao/modules/ModuleRecommendationForm.php @@ -268,20 +268,20 @@ protected function compile(): void // Prepare the record $arrData = [ - 'tstamp' => $time, - 'pid' => $this->recommendation_archive, - 'title' => $arrWidgets['title']->value ?: '', - 'alias' => $arrWidgets['title']->value ? StringUtil::generateAlias($arrWidgets['title']->value) : '', - 'author' => $arrWidgets['author']->value, - 'email' => $arrWidgets['email']->value ?: '', - 'location' => $arrWidgets['location']->value ?: '', - 'customField' => $arrWidgets['customField']->value ?: '', - 'date' => $time, - 'time' => $time, - 'text' => $this->convertLineFeeds($strText), - 'rating' => $arrWidgets['rating']->value, - 'scope' => $arrWidgets['scope']->value ?? '', - 'published' => $this->recommendation_moderate ? '' : 1 + 'tstamp' => $time, + 'pid' => $this->recommendation_archive, + 'title' => $arrWidgets['title']->value ?? '', + 'alias' => isset($arrWidgets['title']) ? StringUtil::generateAlias($arrWidgets['title']->value) : '', + 'author' => $arrWidgets['author']->value, + 'email' => $arrWidgets['email']->value ?? '', + 'location' => $arrWidgets['location']->value ?? '', + 'customField' => $arrWidgets['customField']->value ?? '', + 'date' => $time, + 'time' => $time, + 'text' => $this->convertLineFeeds($strText), + 'rating' => $arrWidgets['rating']->value, + 'scope' => $arrWidgets['scope']->value ?? '', + 'published' => $this->recommendation_moderate ? '' : 1 ]; // Store the recommendation