From 3ccf7ed2654a5a619295a8c790c640f86bbdd22f Mon Sep 17 00:00:00 2001 From: Benjamin Franzke Date: Mon, 21 Jan 2019 12:57:20 +0100 Subject: [PATCH] [BUGFIX] Prevent exception in early bootstrap exception handler ErrorPageController which is used by the ProductionExceptionHandler must not rely on PackageManager to be available. Rather use paths derived from Environment::getFrameworkBasePath(). Releases: master, 9.5 Resolves: #87503 Related: #87175 Change-Id: I556b503e06962b338ec11f2e031eb941417d5944 Reviewed-on: https://review.typo3.org/59518 Tested-by: TYPO3com Reviewed-by: Benni Mack Tested-by: Benni Mack --- Classes/Controller/ErrorPageController.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Classes/Controller/ErrorPageController.php b/Classes/Controller/ErrorPageController.php index c5df01ea2f..3ea851bb0e 100644 --- a/Classes/Controller/ErrorPageController.php +++ b/Classes/Controller/ErrorPageController.php @@ -15,8 +15,8 @@ * The TYPO3 project - inspiring people to share! */ +use TYPO3\CMS\Core\Core\Environment; use TYPO3\CMS\Core\Messaging\AbstractMessage; -use TYPO3\CMS\Core\Utility\ExtensionManagementUtility; use TYPO3\CMS\Core\Utility\GeneralUtility; use TYPO3\CMS\Core\Utility\PathUtility; use TYPO3Fluid\Fluid\Core\Rendering\RenderingContext; @@ -51,7 +51,7 @@ public function __construct() $context->setControllerName('ErrorPage'); $context->setTemplatePaths(new TemplatePaths([ 'templateRootPaths' => [ - ExtensionManagementUtility::extPath('core', 'Resources/Private/Templates/ErrorPage/') + Environment::getFrameworkBasePath() . '/core/Resources/Private/Templates/ErrorPage/' ] ])); $this->view->setRenderingContext($context); @@ -86,8 +86,8 @@ public function errorAction( $this->view->assign('title', $title); $this->view->assign('errorCodeUrlPrefix', TYPO3_URL_EXCEPTION); $this->view->assign('errorCode', $errorCode); - $this->view->assign('logo', PathUtility::getAbsoluteWebPath(ExtensionManagementUtility::extPath('backend', 'Resources/Public/Images/typo3_orange.svg'))); - $this->view->assign('cssFile', PathUtility::getAbsoluteWebPath(ExtensionManagementUtility::extPath('core', 'Resources/Public/Css/errorpage.css'))); + $this->view->assign('logo', PathUtility::getAbsoluteWebPath(Environment::getFrameworkBasePath() . '/backend/Resources/Public/Images/typo3_orange.svg')); + $this->view->assign('cssFile', PathUtility::getAbsoluteWebPath(Environment::getFrameworkBasePath() . '/core/Resources/Public/Css/errorpage.css')); $this->view->assign('copyrightYear', TYPO3_copyright_year); return $this->view->render('Error'); }