Skip to content

Commit

Permalink
fix: empty raw query parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
mnavarrocarter committed Dec 7, 2023
1 parent 31b4a24 commit 96ab392
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions uri/src/Net/Uri/Query.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ public static function create(array $items = []): Query
public static function decode(string $rawQuery): Query
{
$query = new self();

if ($rawQuery === '') {
return $query;
}

$parts = \explode('&', $rawQuery);
foreach ($parts as $part) {
$i = \strpos($part, '=');
Expand Down

0 comments on commit 96ab392

Please sign in to comment.