Skip to content

Commit

Permalink
Merge pull request #93 from l0gicgate/FixUriFactoryBug
Browse files Browse the repository at this point in the history
Fix empty query string parsing bug in UriFactory::createFromGlobals()
  • Loading branch information
l0gicgate committed May 5, 2019
2 parents 095cb19 + 155d308 commit 8f47720
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Factory/UriFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public function createFromGlobals(array $globals): Uri
$requestUri = $uriFragments[0];

if ($queryString === '' && count($uriFragments) > 1) {
$queryString = parse_url('http://www.example.com' . $globals['REQUEST_URI'], PHP_URL_QUERY);
$queryString = parse_url('http://www.example.com' . $globals['REQUEST_URI'], PHP_URL_QUERY) ?? '';
}
}

Expand Down

0 comments on commit 8f47720

Please sign in to comment.