[BUGFIX] Fix PHP warning in shouldFieldBeOverlaid() 20/34320/5
authorMarkus Klein <klein.t3@reelworx.at>
Tue, 18 Nov 2014 20:28:44 +0000 (21:28 +0100)
committerXavier Perseguers <xavier@typo3.org>
Mon, 24 Nov 2014 07:07:29 +0000 (08:07 +0100)
PageRepository::shouldFieldBeOverlaid now properly checks for array-typed
values when mergeIfNotBlank behaviour is requested.

Resolves: #60998
Releases: master, 6.2
Change-Id: I9b536d2261eea6325e0f74365a3a4c85e37b1241
Reviewed-on: http://review.typo3.org/34320
Reviewed-by: Mathias Schreiber <mathias.schreiber@wmdb.de>
Tested-by: Mathias Schreiber <mathias.schreiber@wmdb.de>
Reviewed-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Reviewed-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
Reviewed-by: Xavier Perseguers <xavier@typo3.org>
Tested-by: Xavier Perseguers <xavier@typo3.org>
typo3/sysext/frontend/Classes/Page/PageRepository.php

index edd94c8..5bfdbd7 100644 (file)
@@ -1373,11 +1373,11 @@ class PageRepository {
                                $checkValue = '';
                        }
 
                                $checkValue = '';
                        }
 
-                       if (trim($checkValue) === '') {
+                       if ($checkValue === array() || trim($checkValue) === '') {
                                $shouldFieldBeOverlaid = FALSE;
                        }
                }
 
                return $shouldFieldBeOverlaid;
        }
                                $shouldFieldBeOverlaid = FALSE;
                        }
                }
 
                return $shouldFieldBeOverlaid;
        }
-}
\ No newline at end of file
+}