Skip to content
This repository has been archived by the owner on Oct 8, 2019. It is now read-only.

Commit

Permalink
[BUGFIX] Catch the ImmediateResponseException thrown when hitting acc…
Browse files Browse the repository at this point in the history
…ess restricted pages

Fixes: mittwald#21
  • Loading branch information
the-coding-owl committed Aug 21, 2019
1 parent 51aadcc commit 7dc8434
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Classes/Service/FrontendUrlGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@


use TYPO3\CMS\Backend\Utility\BackendUtility;
use TYPO3\CMS\Core\Http\ImmediateResponseException;
use TYPO3\CMS\Core\TimeTracker\TimeTracker;
use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
use TYPO3\CMS\Core\Utility\GeneralUtility;
Expand All @@ -46,7 +47,12 @@ class FrontendUrlGenerator {
* @return string
*/
public function getFrontendUrl($uid) {
$this->initFrontend($uid);
try {
$this->initFrontend($uid);
} catch (ImmediateResponseException $exception) {
// Page is not accessible
return '/';
}

if ($this->isRootPage($uid)) {
return '/';
Expand Down

0 comments on commit 7dc8434

Please sign in to comment.