Skip to content
4 changes: 2 additions & 2 deletions Classes/Dmailer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'])) {
Expand Down Expand Up @@ -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) {
Expand Down
6 changes: 3 additions & 3 deletions Classes/Module/StatisticsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'] : '';
}
Expand Down Expand Up @@ -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 . ')';
}

Expand Down
3 changes: 2 additions & 1 deletion Classes/SelectCategories.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/**
Expand All @@ -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();
Expand Down