Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trying to access $GLOBALS['BE_USER'] in FE results in logs being flooded with warnings #59

Open
sypets opened this issue Nov 22, 2023 · 1 comment

Comments

@sypets
Copy link
Contributor

sypets commented Nov 22, 2023

Core: Error handler (FE): PHP Warning: Undefined global variable $BE_USER in /var/www/mysite/public/typo3conf/ext/gridelements/Classes/Backend/LayoutSetup.php line 749
I have lots of warnings like these in the "Log" (sys_log).

Unfortunately, I don't have a stack trace for this. It is strange that this is accessed in the FE, shouldn't be or there should be a check there.

code:

   747      public function getBackendUser(): ?BackendUserAuthentication
   748      {
   749          return $GLOBALS['BE_USER'];
   750      }

Versions

  • gridelemens: 11.1.0
  • TYPO3 latest 11.5.33
@Cybercraft-GmbH
Copy link
Collaborator

This seems to be used by "setLanguageService" only, which again is used in BE context only, so it should be enough to add
?? null
in line 749

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants