[BUGFIX] Allow returning null values for PageRouter::matchRoute() 73/58073/2
authorAndreas Fernandez <a.fernandez@scripting-base.de>
Wed, 29 Aug 2018 18:23:01 +0000 (20:23 +0200)
committerAndreas Fernandez <a.fernandez@scripting-base.de>
Wed, 29 Aug 2018 18:39:34 +0000 (20:39 +0200)
Resolves: #86030
Related: #86013
Releases: master
Change-Id: I337861f5dac4e3c7e7babd056e87630c22ec1f3e
Reviewed-on: https://review.typo3.org/58073
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Tested-by: Andreas Fernandez <a.fernandez@scripting-base.de>
typo3/sysext/core/Classes/Routing/PageRouter.php

index 825af84..63a8294 100644 (file)
@@ -62,9 +62,9 @@ class PageRouter
      * @param string $routePathTail
      * @param SiteInterface $site
      * @param SiteLanguage $language
-     * @return RouteResult
+     * @return RouteResult|null
      */
-    public function matchRoute(ServerRequestInterface $request, string $routePathTail, SiteInterface $site, SiteLanguage $language): RouteResult
+    public function matchRoute(ServerRequestInterface $request, string $routePathTail, SiteInterface $site, SiteLanguage $language): ?RouteResult
     {
         $slugCandidates = $this->getCandidateSlugsFromRoutePath($routePathTail);
         if (empty($slugCandidates)) {