[BUGFIX] Fix PHP warning with CTYPE=media 91/33191/6
authorGoran Medakovic <avion.bg@gmail.com>
Tue, 7 Oct 2014 16:38:17 +0000 (18:38 +0200)
committerWouter Wolters <typo3@wouterwolters.nl>
Wed, 8 Oct 2014 21:38:35 +0000 (23:38 +0200)
Check for array type before checking the variable with isset().
If the variable is a string the isset() will cause a PHP warning.

Resolves: #59544
Releases: master, 6.2
Change-Id: I766292a3dc0365a40acff5fd5f089f7ea78e0b70
Reviewed-on: http://review.typo3.org/33191
Reviewed-by: Markus Klein <klein.t3@reelworx.at>
Tested-by: Markus Klein <klein.t3@reelworx.at>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php

index 5c36af4..2397ff5 100644 (file)
@@ -1176,7 +1176,7 @@ class ContentObjectRenderer {
                if ($recursive === FALSE && is_string($flexData)) {
                        $flexData = GeneralUtility::xml2array($flexData, 'T3');
                }
-               if (isset($flexData['data']['sDEF']['lDEF'])) {
+               if (is_array($flexData) && isset($flexData['data']['sDEF']['lDEF'])) {
                        $flexData = $flexData['data']['sDEF']['lDEF'];
                }
                if (!is_array($flexData)) {