Skip to content

Commit

Permalink
[BUGFIX] Prevent exception in early bootstrap exception handler
Browse files Browse the repository at this point in the history
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 <noreply@typo3.com>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
  • Loading branch information
bnf authored and bmack committed Jan 22, 2019
1 parent 32abf6a commit 3ccf7ed
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Classes/Controller/ErrorPageController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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');
}
Expand Down

0 comments on commit 3ccf7ed

Please # to comment.