[BUGFIX] Use correct variable when throwing exception in PageRepository 26/53126/2
authorWouter Wolters <typo3@wouterwolters.nl>
Mon, 5 Jun 2017 14:08:55 +0000 (16:08 +0200)
committerFrank Naegler <frank.naegler@typo3.org>
Mon, 5 Jun 2017 16:46:51 +0000 (18:46 +0200)
The wrong variable is used in a hook exception. Use the correct variable
to prevent fatal errors.

Resolves: #81472
Releases: master,8.7
Change-Id: I8cf84c2ac84c09bbeecc2111eb6128fdc71be3c7
Reviewed-on: https://review.typo3.org/53126
Reviewed-by: Frank Naegler <frank.naegler@typo3.org>
Tested-by: Frank Naegler <frank.naegler@typo3.org>
typo3/sysext/frontend/Classes/Page/PageRepository.php

index 3684fc5..445f9bd 100644 (file)
@@ -201,7 +201,7 @@ class PageRepository
             foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][self::class]['init'] as $classRef) {
                 $hookObject = GeneralUtility::makeInstance($classRef);
                 if (!$hookObject instanceof PageRepositoryInitHookInterface) {
-                    throw new \UnexpectedValueException($hookObject . ' must implement interface ' . PageRepositoryInitHookInterface::class, 1379579812);
+                    throw new \UnexpectedValueException($classRef . ' must implement interface ' . PageRepositoryInitHookInterface::class, 1379579812);
                 }
                 $hookObject->init_postProcess($this);
             }