[BUGFIX] Use interface SiteInterface as return type instead of Site 03/58403/2
authorGeorg Ringer <georg.ringer@gmail.com>
Wed, 26 Sep 2018 18:07:46 +0000 (20:07 +0200)
committerSusanne Moog <susanne.moog@typo3.org>
Thu, 27 Sep 2018 17:18:46 +0000 (19:18 +0200)
To avoid exceptions the proper return type must be used.

Resolves: #86390
Releases: master
Change-Id: I3741582936cb1e1b530012a1c7fb8ff3ab6da934
Reviewed-on: https://review.typo3.org/58403
Reviewed-by: Tymoteusz Motylewski <t.motylewski@gmail.com>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
Reviewed-by: Susanne Moog <susanne.moog@typo3.org>
Tested-by: Susanne Moog <susanne.moog@typo3.org>
typo3/sysext/core/Classes/ExpressionLanguage/RequestWrapper.php

index 9a5ad58..af72b65 100644 (file)
@@ -18,7 +18,7 @@ namespace TYPO3\CMS\Core\ExpressionLanguage;
 use Psr\Http\Message\ServerRequestInterface;
 use TYPO3\CMS\Core\Http\NormalizedParams;
 use TYPO3\CMS\Core\Http\ServerRequest;
-use TYPO3\CMS\Core\Site\Entity\Site;
+use TYPO3\CMS\Core\Site\Entity\SiteInterface;
 use TYPO3\CMS\Core\Site\Entity\SiteLanguage;
 
 /**
@@ -63,7 +63,7 @@ class RequestWrapper
         return $this->request->getCookieParams();
     }
 
-    public function getSite(): ?Site
+    public function getSite(): ?SiteInterface
     {
         return $this->request->getAttribute('site');
     }