From 96ab392876dd111cb5772467ced81dcf752f2095 Mon Sep 17 00:00:00 2001 From: Matias Navarro Carter Date: Thu, 7 Dec 2023 11:35:34 +0000 Subject: [PATCH] fix: empty raw query parsing --- uri/src/Net/Uri/Query.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/uri/src/Net/Uri/Query.php b/uri/src/Net/Uri/Query.php index a759370..60cf3e2 100644 --- a/uri/src/Net/Uri/Query.php +++ b/uri/src/Net/Uri/Query.php @@ -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, '=');