Skip to content

Commit

Permalink
[CLEANUP] Use namespace for Site
Browse files Browse the repository at this point in the history
  • Loading branch information
Felix Semmler committed May 28, 2021
1 parent 5d7fb19 commit 5e2501e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Classes/System/Restler/RestlerExtended.php
Expand Up @@ -4,7 +4,7 @@
/***************************************************************
* Copyright notice
*
* (c) 2016 AOE GmbH <dev@aoe.com>
* (c) 2021 AOE GmbH <dev@aoe.com>
*
* All rights reserved
*
Expand Down Expand Up @@ -32,6 +32,7 @@
use Luracast\Restler\Restler;
use Luracast\Restler\Scope;
use Psr\Http\Message\ServerRequestInterface;
use TYPO3\CMS\Core\Site\Entity\Site;

class RestlerExtended extends Restler
{
Expand Down Expand Up @@ -111,7 +112,7 @@ protected function getPath()
if ($this->request !== null) {
// set base path depending on site config
$site = $this->request->getAttribute('site');
if ($site !== null && $site instanceof \TYPO3\CMS\Core\Site\Entity\Site) {
if ($site !== null && $site instanceof Site) {
$siteBasePath = $this->request->getAttribute('site')->getBase()->getPath();
if ($siteBasePath !== '/' && $siteBasePath[-1] !== '/') {
$siteBasePath .= '/';
Expand Down

0 comments on commit 5e2501e

Please sign in to comment.