Skip to content
This repository has been archived by the owner on May 3, 2019. It is now read-only.

Commit

Permalink
BUGFIX: Only pass strings to pathinfo
Browse files Browse the repository at this point in the history
  • Loading branch information
Torsten85 authored and johannessteu committed Jan 28, 2019
1 parent d984edc commit 365f8e6
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions Classes/Router.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,12 @@ class Router extends \Neos\Flow\Mvc\Routing\Router
*/
public function resolve(ResolveContext $resolveContext): UriInterface
{
/** @var Uri $uri */
$uri = parent::resolve($resolveContext);

if ($this->matchesBlacklist($uri) === false && isset(pathinfo($uri)['extension']) === false) {
// $uri needs to be reparsed, because the path often contains the query
if ($this->matchesBlacklist($uri) === false && isset(pathinfo((string) $uri)['extension']) === false) {
// $uri needs to be re-parsed, because the path often contains the query
$parsedUri = new Uri((string) $uri);
$parsedUri->setPath(rtrim($parsedUri->getPath(), '/') . '/');
return $parsedUri;
return $parsedUri->withPath(rtrim($parsedUri->getPath(), '/') . '/');
}

return $uri;
Expand Down

0 comments on commit 365f8e6

Please sign in to comment.