Fix empty query route

This commit is contained in:
Dennis Eichhorn 2016-12-16 22:55:27 +01:00
parent 67ad863a56
commit 174d597682

View File

@ -266,7 +266,8 @@ class Http implements UriInterface
*/ */
public function getRoute() : string public function getRoute() : string
{ {
return ($this->path ?? '') . '?' . $this->getQuery(); $query = $this->getQuery();
return ($this->path ?? '') . (!empty($query) ? '?' . $this->getQuery() : '');
} }
/** /**