diff --git a/Classes/Dmailer.php b/Classes/Dmailer.php index 9c1e83be1..1b532e14a 100644 --- a/Classes/Dmailer.php +++ b/Classes/Dmailer.php @@ -404,7 +404,7 @@ public function sendAdvanced(array $recipientRow, string $tableNameChar): int // Plain $this->theParts['plain']['content'] = ''; if ($this->flagPlain) { - $tempContentPlain = $this->getBoundaryParts($this->dmailer['boundaryParts_plain'], $recipientRow['sys_dmail_categories_list']); + $tempContentPlain = $this->getBoundaryParts($this->dmailer['boundaryParts_plain'], $recipientRow['sys_dmail_categories_list'] ?? ''); if ($this->mailHasContent) { $tempContentPlain = $this->replaceMailMarkers($tempContentPlain, $recipientRow, $additionalMarkers); if (trim($this->dmailer['sys_dmail_rec']['use_rdct']) || trim($this->dmailer['sys_dmail_rec']['long_link_mode'])) { @@ -844,7 +844,7 @@ protected function setContent(MailMessage $mailer): void $this->extractMediaLinks(); foreach ($this->theParts['html']['media'] as $media) { // TODO: why are there table related tags here? - if (in_array($media['tag'], ['img', 'table', 'tr', 'td'], true) && !$media['use_jumpurl'] && !$media['do_not_embed']) { + if (isset($media['tag']) && in_array($media['tag'], ['img', 'table', 'tr', 'td'], true) && !$media['use_jumpurl'] && !$media['do_not_embed']) { if (ini_get('allow_url_fopen')) { $context = GeneralUtility::makeInstance(FetchUtility::class)->getStreamContext(); if (($fp = fopen($media['absRef'], 'r', false, $context)) !== false) { diff --git a/Classes/Module/StatisticsController.php b/Classes/Module/StatisticsController.php index 75c23fc6a..85edcc5e7 100644 --- a/Classes/Module/StatisticsController.php +++ b/Classes/Module/StatisticsController.php @@ -1574,7 +1574,7 @@ public function getUrlStr(array $urlParts): string $urlstr .= ($urlParts['fragment'] ?? '') ? '#' . $urlParts['fragment'] : ''; } } else { - $urlstr = ((isset($urlParts['host']) && $urlParts['host']) ? $urlParts['scheme'] . '://' . $urlParts['host'] : $baseUrl) . $urlParts['path']; + $urlstr = ((isset($urlParts['host']) && $urlParts['host']) ? $urlParts['scheme'] . '://' . $urlParts['host'] : $baseUrl) . ($urlParts['path'] ?? ''); $urlstr .= ($urlParts['query'] ?? '') ? '?' . $urlParts['query'] : ''; $urlstr .= ($urlParts['fragment'] ?? '') ? '#' . $urlParts['fragment'] : ''; } @@ -1653,11 +1653,11 @@ public function getLinkLabel( } - if ($this->implodedParams['showContentTitle'] == 1) { + if (isset($this->implodedParams['showContentTitle']) && $this->implodedParams['showContentTitle'] == 1) { $label = $contentTitle; } - if ($this->implodedParams['prependContentTitle'] == 1) { + if (isset($this->implodedParams['prependContentTitle']) && $this->implodedParams['prependContentTitle'] == 1) { $label = $contentTitle . ' (' . $linkedWord . ')'; } diff --git a/Classes/SelectCategories.php b/Classes/SelectCategories.php index c24af3f3c..5b298bea4 100644 --- a/Classes/SelectCategories.php +++ b/Classes/SelectCategories.php @@ -17,6 +17,7 @@ use DirectMailTeam\DirectMail\Repository\TempRepository; use TYPO3\CMS\Core\Localization\LanguageService; +use TYPO3\CMS\Core\Site\Entity\Site; use TYPO3\CMS\Core\Utility\GeneralUtility; /** @@ -39,7 +40,7 @@ public function getLocalizedCategories(array &$params): void $lang = $this->getLang(); $site = $params['site']; - $languages = $site->getAllLanguages(); + $languages = ($site instanceof Site) ? $site->getAllLanguages() : []; foreach($languages as $language) { if($language->getLocale()->getLanguageCode() == $lang) { $sysLanguageUid = $language->getLanguageId();