Project

General

Profile

Actions

Bug #99795

closed

PHP Warning: Undefined property: TYPO3\\CMS\\Beuser\\Domain\\Model\\BackendUser::$workspace in /typo3_src-11.5.22/web/typo3/sysext/core/Classes/TypoScript/ExtendedTemplateService.php line 709

Added by Thomas Hohn almost 2 years ago. Updated almost 2 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
TypoScript
Start date:
2023-02-02
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
11
PHP Version:
8.2
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

It seems that ExtendedTemplateService has the following a reference to $GLOBALS['BE_USER']->workspace):

 $queryBuilder->getRestrictions()
            ->removeAll()
            ->add(GeneralUtility::makeInstance(DeletedRestriction::class))
            ->add(GeneralUtility::makeInstance(WorkspaceRestriction::class, $GLOBALS['BE_USER']->workspace));

This should be replaced with
$this->context->getAspect('workspace')->get('id)

Actions

Also available in: Atom PDF