From 5a68c2458a7cae44c64ea00f58b69c55eabd4b04 Mon Sep 17 00:00:00 2001 From: Andreas Engel Date: Tue, 10 Sep 2019 13:54:20 +0200 Subject: [PATCH] [BUGFIX] Fix handling of rules for language uid 0 when target page is current page --- Classes/Action/Redirect.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Classes/Action/Redirect.php b/Classes/Action/Redirect.php index a7b04b5..ac3b20a 100644 --- a/Classes/Action/Redirect.php +++ b/Classes/Action/Redirect.php @@ -197,7 +197,7 @@ private function shouldRedirect(int $sysLanguageUid): bool */ private function redirectToPid(string $target, string $language, int $httpResponseCode) { - if ($language) { + if (is_numeric($language)) { $languageId = (int)$language; $urlParameters = ['L' => intval($language)]; } else { @@ -211,7 +211,7 @@ private function redirectToPid(string $target, string $language, int $httpRespon if ($targetPageUid) { if ($targetPageUid == $GLOBALS['TSFE']->id) { // Legacy (only TYPO3 8) - if ($urlParameters['L']) { + if (isset($urlParameters['L']) && is_numeric($urlParameters['L'])) { if ($this->requestedLanguageUid == $urlParameters['L']) { return;