[BUGFIX] Force string casting of $parserList 41/50841/2
authorAndreas Fernandez <a.fernandez@scripting-base.de>
Thu, 1 Dec 2016 19:05:41 +0000 (20:05 +0100)
committerWouter Wolters <typo3@wouterwolters.nl>
Thu, 1 Dec 2016 20:54:47 +0000 (21:54 +0100)
The method `BackendUtility::explodeSoftRefParserList()` checks whether
`$parserList` is an empty string. This check may fail, as the variable may
be null instead. `$parserList` is now casted to a string, which converts
null to an empty string.

Resolves: #78858
Releases: master, 7.6
Change-Id: Ia833fd64f3349c5856a879e917bb3cd6f581caa0
Reviewed-on: https://review.typo3.org/50841
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
typo3/sysext/backend/Classes/Utility/BackendUtility.php

index f2a6534..4529ceb 100644 (file)
@@ -4134,7 +4134,7 @@ class BackendUtility
     public static function explodeSoftRefParserList($parserList)
     {
         // Return immediately if list is blank:
-        if ($parserList === '') {
+        if ((string)$parserList === '') {
             return false;
         }