Skip to content

Commit

Permalink
[BUGFIX] Fix v:resource.record viewhelper for PHP 8 when used in back…
Browse files Browse the repository at this point in the history
…end (#1758)

Co-authored-by: Claus Due <claus@namelesscoder.net>
  • Loading branch information
kraemer-igroup and NamelessCoder authored Apr 21, 2022
1 parent 33014dc commit 16046ae
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ public function getRecord($id)
/** @var QueryBuilder $queryBuilder */
$queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable($table);

if ($GLOBALS["TSFE"]->fePreview) {
if (isset($GLOBALS['TSFE']) && $GLOBALS['TSFE']->fePreview) {
$queryBuilder->getRestrictions()->removeByType(HiddenRestriction::class);
}

Expand Down

0 comments on commit 16046ae

Please sign in to comment.