Skip to content

Commit

Permalink
[BUGFIX] Check if page exist before using record for preview
Browse files Browse the repository at this point in the history
Deleted pages must be excluded at content element previews in the page
module to avoid exceptions.

Resolves: #93938
Related: #93659
Releases: master, 10.4
Change-Id: I8786a6a93eac354684542d54ca1270d58cb05530
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/68798
Tested-by: TYPO3com <noreply@typo3.com>
Tested-by: core-ci <typo3@b13.com>
Tested-by: Riccardo De Contardi <erredeco@gmail.com>
Tested-by: Oliver Bartsch <bo@cedev.de>
Tested-by: Richard Haeser <richard@richardhaeser.com>
Reviewed-by: Oliver Bartsch <bo@cedev.de>
Reviewed-by: Richard Haeser <richard@richardhaeser.com>
  • Loading branch information
georgringer authored and haassie committed Apr 19, 2021
1 parent 7258b52 commit 8bc8419
Showing 1 changed file with 3 additions and 1 deletion.
Expand Up @@ -392,7 +392,9 @@ protected function generateListForMenuContentTypes(array $record): string
foreach ($uidList as $uid) {
$uid = (int)$uid;
$pageRecord = BackendUtility::getRecord($table, $uid, 'title');
$content .= '<br>' . htmlspecialchars($pageRecord['title']) . ' (' . $uid . ')';
if ($pageRecord) {
$content .= '<br>' . htmlspecialchars($pageRecord['title']) . ' (' . $uid . ')';
}
}
return $content;
}
Expand Down

0 comments on commit 8bc8419

Please sign in to comment.