Issue Bug Closed

#80917Backend: Uncaught TYPO3 Exception in FrontendGroupRestriction constructor if $GLOBALS['TSFE']->gr_list is null

Wolfgang Klinger 04/20/17, 15:00 updated 07/03/17, 12:55

Description

Exception in the backend (where there is no GLOBALS[TSFE] anyway) when saving a news record

explode() expects parameter 2 to be string, null given 

TypeError thrown in file
…vendor/typo3/cms/typo3/sysext/core/Classes/Database/Query/Restriction/FrontendGroupRestriction.php in line 36.

There’s no check for either $this->getEnvironmentMode() === ‘FE’ or if the value is a string before using explode

$this->frontendGroupIds = $frontendGroupIds === null ? explode(',', $GLOBALS['TSFE']->gr_list) : $frontendGroupIds;

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.