Project

General

Profile

Actions

Bug #76031

closed

getPageOverlay Hook does not loop through pages by reference

Added by Andreas Allacher over 8 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Frontend
Start date:
2016-05-03
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
7
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:
On Location Sprint

Description

With the introduction of getPagesOverlay the page array is looped to pass each page to the getPageOverlay_preProcess hook:

foreach ($pagesInput as $origPage) {
                foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_page.php']['getPageOverlay'] as $classRef) {
                    $hookObject = GeneralUtility::getUserObj($classRef);
                    if (!$hookObject instanceof PageRepositoryGetPageOverlayHookInterface) {
                        throw new \UnexpectedValueException('$hookObject must implement interface ' . PageRepositoryGetPageOverlayHookInterface::class, 1269878881);
                    }
                    $hookObject->getPageOverlay_preProcess($origPage, $lUid, $this);
                }
            }

However, as the foreach loop doesn't use & before $origPage modified values in getPageOverlay_preProcess will never make it back to the original page array.


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Feature #64258: PageRepository::getPageOverlay() for multiple pages at onceClosed2015-01-13

Actions
Actions

Also available in: Atom PDF