Commit 8bc8419f authored by Georg Ringer's avatar Georg Ringer Committed by Richard Haeser

[BUGFIX] Check if page exist before using record for preview

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/+/68798Tested-by: default avatarTYPO3com <noreply@typo3.com>
Tested-by: core-ci's avatarcore-ci <typo3@b13.com>
Tested-by: Riccardo De Contardi's avatarRiccardo De Contardi <erredeco@gmail.com>
Tested-by: Oliver Bartsch's avatarOliver Bartsch <bo@cedev.de>
Tested-by: Richard Haeser's avatarRichard Haeser <richard@richardhaeser.com>
Reviewed-by: Oliver Bartsch's avatarOliver Bartsch <bo@cedev.de>
Reviewed-by: Richard Haeser's avatarRichard Haeser <richard@richardhaeser.com>
parent 7258b524
......@@ -392,7 +392,9 @@ class StandardContentPreviewRenderer implements PreviewRendererInterface, Logger
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;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment