[BUGFIX] Fix PHP warning trigged in initFEuser 38/22338/2
authorMarkus Klein <klein.t3@mfc-linz.at>
Mon, 15 Jul 2013 18:32:18 +0000 (20:32 +0200)
committerWouter Wolters <typo3@wouterwolters.nl>
Mon, 15 Jul 2013 20:37:42 +0000 (22:37 +0200)
TypoScriptFrontendController::initFEuser() calls
$GLOBALS['TYPO3_DB']->cleanIntList() with a possible NULL argument.
This leads to a PHP warning in GeneralUtility::trimExplode().

Resolves: #42921
Releases: 6.2, 6.1, 6.0, 4.7, 4.5
Change-Id: Id33ee8fe5e4177716af6ce8c9084e098b86c280c
Reviewed-on: https://review.typo3.org/22338
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php

index 99e78a9..26e1cf6 100644 (file)
@@ -906,7 +906,8 @@ class TypoScriptFrontendController {
                $this->fe_user->checkPid = $this->TYPO3_CONF_VARS['FE']['checkFeUserPid'];
                $this->fe_user->lifetime = intval($this->TYPO3_CONF_VARS['FE']['lifetime']);
                // List of pid's acceptable
-               $this->fe_user->checkPid_value = $GLOBALS['TYPO3_DB']->cleanIntList(\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('pid'));
+               $pid = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('pid');
+               $this->fe_user->checkPid_value = $pid ? $GLOBALS['TYPO3_DB']->cleanIntList($pid) : 0;
                // Check if a session is transferred:
                if (\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('FE_SESSION_KEY')) {
                        $fe_sParts = explode('-', \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('FE_SESSION_KEY'));