diff --git a/Classes/Module/DmailController.php b/Classes/Module/DmailController.php index a634b7aa1..311f3c0e9 100644 --- a/Classes/Module/DmailController.php +++ b/Classes/Module/DmailController.php @@ -1219,7 +1219,7 @@ protected function sendMail($row) } elseif ($this->cmd == DmailCmdEnum::SendMailTest->value) { // step 4, sending test personalized test emails // setting Testmail flag - $htmlmail->setTestmail((bool)$this->params['testmail']); + $htmlmail->setTestmail((bool)($this->params['testmail'] ?? false)); if ($this->tt_address_uid) { // personalized to tt_address diff --git a/Classes/Plugin/DirectMail.php b/Classes/Plugin/DirectMail.php index 8a2595903..c3d9c6d3f 100644 --- a/Classes/Plugin/DirectMail.php +++ b/Classes/Plugin/DirectMail.php @@ -741,11 +741,11 @@ public function renderImages(array $imagesArray, string $fieldname): string // create the image, imagelink and image caption block foreach ($imagesArray as $k => $image) { - if (strlen(trim($image['image'])) > 0) { + if (array_key_exists('image', $image) && strlen(trim($image['image'])) > 0) { $lines[] = $image['image']; if ($image['link']) { $theLink = $this->getLink($image['link']); - if ($theLink) { + if (array_key_exists($fieldname . '.', $this->conf) && $theLink) { $lines[] = $this->getString($this->conf[$fieldname . '.']['linkPrefix']) . $theLink; } } @@ -758,7 +758,7 @@ public function renderImages(array $imagesArray, string $fieldname): string $imageExists = true; } } - if ($this->conf[$fieldname . '.']['header'] && $imageExists) { + if (array_key_exists($fieldname . '.', $this->conf) && $this->conf[$fieldname . '.']['header'] && $imageExists) { array_unshift($lines, $this->getString($this->conf[$fieldname . '.']['header'])); } @@ -825,7 +825,7 @@ public function getString(string $str): string */ public function userProcess(string $mConfKey, $passVar) { - if ($this->conf[$mConfKey]) { + if ($this->conf[$mConfKey] ?? false) { $funcConf = $this->conf[$mConfKey . '.']; $funcConf['parentObj']=&$this; $passVar = $GLOBALS['TSFE']->cObj->callUserFunction( diff --git a/Classes/SelectCategories.php b/Classes/SelectCategories.php index c24af3f3c..b86c07659 100644 --- a/Classes/SelectCategories.php +++ b/Classes/SelectCategories.php @@ -39,7 +39,7 @@ public function getLocalizedCategories(array &$params): void $lang = $this->getLang(); $site = $params['site']; - $languages = $site->getAllLanguages(); + $languages = $site->getAllLanguages() ?? []; foreach($languages as $language) { if($language->getLocale()->getLanguageCode() == $lang) { $sysLanguageUid = $language->getLanguageId();