[BUGFIX] Use correct variable when throwing exception in PageRepository 22/53122/3
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:45:39 +0000 (18:45 +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/53122
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Frank Naegler <frank.naegler@typo3.org>
Tested-by: Frank Naegler <frank.naegler@typo3.org>
typo3/sysext/frontend/Classes/Page/PageRepository.php

index b31fb18..a95d6b4 100644 (file)
@@ -200,7 +200,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);
             }