From 174d5976828ff315a28f4ada4316387d5004ff7b Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Fri, 16 Dec 2016 22:55:27 +0100 Subject: [PATCH] Fix empty query route --- Uri/Http.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Uri/Http.php b/Uri/Http.php index cdf678c98..18d6c88df 100644 --- a/Uri/Http.php +++ b/Uri/Http.php @@ -266,7 +266,8 @@ class Http implements UriInterface */ public function getRoute() : string { - return ($this->path ?? '') . '?' . $this->getQuery(); + $query = $this->getQuery(); + return ($this->path ?? '') . (!empty($query) ? '?' . $this->getQuery() : ''); } /**