[BUGFIX] getPageOverlayHook has to use GeneralUtility::getUserObj 76/38876/4
authorAndreas Allacher <andreas.allacher@gmx.at>
Thu, 23 Apr 2015 13:35:29 +0000 (15:35 +0200)
committerMarkus Klein <klein.t3@reelworx.at>
Thu, 23 Apr 2015 14:16:59 +0000 (16:16 +0200)
The introduction of getPagesOverlay in
commit f6f12f0fcfef0b565a4fcb9f31dd6e780c828ed
modified the hook to use GeneralUtility::makeInstance instead of
GeneralUtility::getUserObj which is a breaking change.

We revert this change now, and use GeneralUtility::getUserObj again.

Change-Id: I43521b85308a69cdafb8fbc5a374d2b99dc22875
Resolves: #66557
Related: #64258
Releases: master
Reviewed-on: http://review.typo3.org/38876
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Markus Klein <klein.t3@reelworx.at>
Tested-by: Markus Klein <klein.t3@reelworx.at>
typo3/sysext/frontend/Classes/Page/PageRepository.php

index f40ad1c..61851ef 100644 (file)
@@ -346,7 +346,7 @@ class PageRepository {
                if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_page.php']['getPageOverlay'])) {
                        foreach ($pagesInput as $origPage) {
                                foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_page.php']['getPageOverlay'] as $classRef) {
-                                       $hookObject = GeneralUtility::makeInstance($classRef);
+                                       $hookObject = GeneralUtility::getUserObj($classRef);
                                        if (!$hookObject instanceof PageRepositoryGetPageOverlayHookInterface) {
                                                throw new \UnexpectedValueException('$hookObject must implement interface ' . PageRepositoryGetPageOverlayHookInterface::class, 1269878881);
                                        }