[BUGFIX] Convert languageId to integer before passing to getLanguageById 99/56599/2
authorSimon Gilli <typo3@gilbertsoft.org>
Fri, 6 Apr 2018 22:47:20 +0000 (00:47 +0200)
committerBenni Mack <benni@typo3.org>
Sat, 7 Apr 2018 12:12:55 +0000 (14:12 +0200)
ServerRequestInterface->getQueryParams() returns as string value which
has to be converted to an integer before passing it to
Site->getLanguageById().

Resolves: #84652
Related: #84581
Releases: master
Change-Id: Ibfdb2043aa5f6aee1e7e3cf92d752c7f399ef39b
Reviewed-on: https://review.typo3.org/56599
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
Reviewed-by: Frans Saris <franssaris@gmail.com>
Reviewed-by: Simon Gilli <typo3@gilbertsoft.org>
Tested-by: Simon Gilli <typo3@gilbertsoft.org>
Reviewed-by: Oliver Klee <typo3-coding@oliverklee.de>
Tested-by: Riccardo De Contardi <erredeco@gmail.com>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
typo3/sysext/frontend/Classes/Middleware/SiteResolver.php

index fc8368e..fec8cc2 100644 (file)
@@ -57,7 +57,7 @@ class SiteResolver implements MiddlewareInterface
             // Loop over the whole rootline without permissions to get the actual site information
             try {
                 $site = $finder->getSiteByPageId((int)$pageId);
-                $language = $site->getLanguageById($languageId);
+                $language = $site->getLanguageById((int)$languageId);
             } catch (SiteNotFoundException $e) {
             }
         }