Skip to content

Commit

Permalink
Merge pull request #17 from bitmotionAE/TYPO3_8
Browse files Browse the repository at this point in the history
[BUGFIX] Fix handling of rules for language uid 0 when target page is current page
  • Loading branch information
Florian Wessels authored Sep 11, 2019
2 parents ffbee55 + 5a68c24 commit c997d03
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Classes/Action/Redirect.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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;
Expand Down

0 comments on commit c997d03

Please sign in to comment.