[BUGFIX] Fix invalid global for getData hooks 35/22735/3
authorAlexander Stehlik <alexander.stehlik@googlemail.com>
Wed, 31 Jul 2013 16:21:31 +0000 (18:21 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Thu, 1 Aug 2013 14:30:08 +0000 (16:30 +0200)
Replace the invalid usage of $TYPO3_CONF_VARS with
$GLOBALS['TYPO3_CONF_VARS'] for getting the hook
configuration in ContentObjectRenderer::getData().

This bug was introduced with issue #50606 in 6.2 only.

Resolves: #50606
Related: #50258
Releases: 6.2
Change-Id: Ib553f8c0dacd891e4bd392481ef7b4773386287f
Reviewed-on: https://review.typo3.org/22735
Reviewed-by: Anja Leichsenring
Tested-by: Anja Leichsenring
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php

index d8203bc..aca331b 100644 (file)
@@ -5423,8 +5423,8 @@ class ContentObjectRenderer {
                                                break;
                                }
                        }
-                       if (is_array($TYPO3_CONF_VARS['SC_OPTIONS']['tslib/class.tslib_content.php']['getData'])) {
-                               foreach ($TYPO3_CONF_VARS['SC_OPTIONS']['tslib/class.tslib_content.php']['getData'] as $classData) {
+                       if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_content.php']['getData'])) {
+                               foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_content.php']['getData'] as $classData) {
                                        $hookObject = GeneralUtility::getUserObj($classData);
                                        if (!$hookObject instanceof \TYPO3\CMS\Frontend\ContentObject\ContentObjectGetDataHookInterface) {
                                                throw new \UnexpectedValueException('$hookObject must implement interface TYPO3\\CMS\\Frontend\\ContentObject\\ContentObjectGetDataHookInterface', 1195044480);