[FOLLOWUP][BUGFIX] Fix PHP warning in shouldFieldBeOverlaid() 28/37928/2
authorMarkus Klein <klein.t3@reelworx.at>
Wed, 18 Mar 2015 16:26:50 +0000 (17:26 +0100)
committerWouter Wolters <typo3@wouterwolters.nl>
Thu, 19 Mar 2015 08:04:45 +0000 (09:04 +0100)
We have to check the type of the variable properly.
In case we have a non-empty array, we must not run trim() on it.

Releases: master, 6.2
Resolves: #60998
Change-Id: I3bef04a3e64d4c811c71a110fa0bfba4fc3fc361
Reviewed-on: http://review.typo3.org/37928
Reviewed-by: Florian Engelke <engelke@louis.info>
Tested-by: Florian Engelke <engelke@louis.info>
Reviewed-by: Wolfgang Baumgartner <wolfgang.baumgartner@hswt.de>
Tested-by: Wolfgang Baumgartner <wolfgang.baumgartner@hswt.de>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
typo3/sysext/frontend/Classes/Page/PageRepository.php

index b15a309..f40ad1c 100644 (file)
@@ -1441,7 +1441,7 @@ class PageRepository {
                                $checkValue = '';
                        }
 
-                       if ($checkValue === array() || trim($checkValue) === '') {
+                       if ($checkValue === array() || !is_array($checkValue) && trim($checkValue) === '') {
                                $shouldFieldBeOverlaid = FALSE;
                        }
                }