From 059a9583e13c007dc18f3af531e98e64bfdea237 Mon Sep 17 00:00:00 2001
From: Wouter Wolters <typo3@wouterwolters.nl>
Date: Mon, 5 Jun 2017 16:08:55 +0200
Subject: [PATCH] [BUGFIX] Use correct variable when throwing exception in
 PageRepository

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 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/typo3/sysext/frontend/Classes/Page/PageRepository.php b/typo3/sysext/frontend/Classes/Page/PageRepository.php
index b31fb18a908c..a95d6b457571 100644
--- a/typo3/sysext/frontend/Classes/Page/PageRepository.php
+++ b/typo3/sysext/frontend/Classes/Page/PageRepository.php
@@ -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);
             }
-- 
GitLab