diff --git a/typo3/sysext/indexed_search/Classes/Controller/SearchController.php b/typo3/sysext/indexed_search/Classes/Controller/SearchController.php index 28f3c9dd714130ed3f16428b0f35bc0ea17c23bc..c16c695624539b1c268f0e193e81b612ab98e829 100644 --- a/typo3/sysext/indexed_search/Classes/Controller/SearchController.php +++ b/typo3/sysext/indexed_search/Classes/Controller/SearchController.php @@ -476,11 +476,13 @@ class SearchController extends ActionController $resultData['CSSsuffix'] = $specRowConf['CSSsuffix'] ? '-' . $specRowConf['CSSsuffix'] : ''; if ($this->multiplePagesType($row['item_type'])) { $dat = json_decode($row['static_page_arguments'], true); - $pp = explode('-', $dat['key']); - if ($pp[0] != $pp[1]) { - $resultData['titleaddition'] = ', ' . LocalizationUtility::translate('result.pages', 'IndexedSearch') . ' ' . $dat['key']; - } else { - $resultData['titleaddition'] = ', ' . LocalizationUtility::translate('result.page', 'IndexedSearch') . ' ' . $pp[0]; + if (is_array($dat) && is_string($dat['key'] ?? null) && $dat['key'] !== '') { + $pp = explode('-', $dat['key']); + if ($pp[0] != $pp[1]) { + $resultData['titleaddition'] = ', ' . LocalizationUtility::translate('result.pages', 'IndexedSearch') . ' ' . $dat['key']; + } else { + $resultData['titleaddition'] = ', ' . LocalizationUtility::translate('result.page', 'IndexedSearch') . ' ' . $pp[0]; + } } } $title = $resultData['item_title'] . $resultData['titleaddition'];