[BUGFIX] Port for Symfony-Route must be a string 28/57928/2
authorJulian Wundrak <julian@wundrak.net>
Thu, 16 Aug 2018 11:41:36 +0000 (13:41 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Fri, 17 Aug 2018 10:33:04 +0000 (12:33 +0200)
We use parse_url to determine the port, but symfony-route requires a string.

Resolves: #85872
Releases: master
Change-Id: I45140e0c3c1820e77dcdd9b9b41d68a7755d7477
Reviewed-on: https://review.typo3.org/57928
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Reviewed-by: Jörg Bösche <typo3@joergboesche.de>
Reviewed-by: Jan Helke <typo3@helke.de>
Tested-by: Jan Helke <typo3@helke.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/core/Classes/Site/SiteFinder.php

index 508d065..5f1ab5e 100644 (file)
@@ -85,7 +85,7 @@ class SiteFinder
                 $route = new Route(
                     ($urlParts['path'] ?? '/') . '{next}',
                     ['next' => '', 'site' => $site, 'language' => $siteLanguage],
-                    array_filter(['next' => '.*', 'port' => $urlParts['port'] ?? null]),
+                    array_filter(['next' => '.*', 'port' => (string)($urlParts['port'] ?? '')]),
                     ['utf8' => true],
                     $urlParts['host'] ?? '',
                     !empty($urlParts['scheme']) ? [$urlParts['scheme']] : null