Commit 30759170 authored by Benni Mack's avatar Benni Mack Committed by Daniel Goerz

[BUGFIX] Avoid fatal errors with empty bodytext content

The page module does not throw a fatal error
anymore if a content type "text" has a bodytext
of value "null" instead of "text".

Resolves: #93283
Releases: master
Change-Id: I23b5c508d1886dc2277e5d4a2010f8a57fd8bb85
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/67443Tested-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
Tested-by: default avatarTYPO3com <noreply@typo3.com>
Tested-by: Oliver Bartsch's avatarOliver Bartsch <bo@cedev.de>
Tested-by: Daniel Goerz's avatarDaniel Goerz <daniel.goerz@posteo.de>
Reviewed-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
Reviewed-by: Oliver Bartsch's avatarOliver Bartsch <bo@cedev.de>
Reviewed-by: Daniel Goerz's avatarDaniel Goerz <daniel.goerz@posteo.de>
parent 4931fc29
......@@ -29,6 +29,6 @@ class TextPreviewRenderer extends StandardContentPreviewRenderer
public function renderPageModulePreviewContent(GridColumnItem $item): string
{
$row = $item->getRecord();
return $this->linkEditContent($this->renderText($row['bodytext']), $row) . '<br />';
return $this->linkEditContent($this->renderText($row['bodytext'] ?? ''), $row) . '<br />';
}
}
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