Skip to content

Commit 5702011

Browse files
committed
[BUGFIX] Prevent access to possibly null global variable
1 parent 73bc85f commit 5702011

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Classes/ViewHelpers/Resource/Record/FalViewHelper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ public function getResources(array $record): array
169169
$queryBuilder->expr()->eq('fieldname', ':fieldname')
170170
);
171171

172-
if ($GLOBALS['BE_USER']->workspaceRec['uid']) {
172+
if ($GLOBALS['BE_USER'] && $GLOBALS['BE_USER']->workspaceRec['uid']) {
173173
$queryBuilder->createNamedParameter(
174174
$GLOBALS['BE_USER']->workspaceRec['uid'],
175175
Connection::PARAM_INT,

0 commit comments

Comments
 (0)