-
Notifications
You must be signed in to change notification settings - Fork 232
Description
I have checked that the bug exists in the dev-development branch
Yes
I have checked that there are no already open issues or recently closed issues about this bug
Yes
Describe the bug
Using access restricted pages in Typo3 v13 results in an exception with v:menu:
(1/1) TypeError
array_intersect(): Argument #1 ($array) must be of type array, null given
Probably because $GLOBALS['TSFE']->fe_user has been removed in v13 (https://docs.typo3.org/m/typo3/reference-typoscript/main/en-us/AppendixA/Index.html#appendix-include-tsfe-feuser-migration):
vhs/Classes/Service/PageService.php
Lines 219 to 221 in 6fdbada
| $userIsLoggedIn = (is_array($GLOBALS['TSFE']->fe_user->user)); | |
| $userGroups = $GLOBALS['TSFE']->fe_user->groupData['uid']; | |
| $userIsInGrantedGroups = (0 < count(array_intersect($userGroups, $groups))); |
To Reproduce
Use v:menu in a template, use access restricted pages in page tree, maybe also set showAccessProtected="1" on a v13 system.
Expected behavior
No exception should be thrown.
Screenshots
Additional context
Another access to $GLOBALS['TSFE']->fe_user, which might be problematic in v13 (not sure):