Skip to content

Commit bb95905

Browse files
committed
:octocat: Query::parse -> handle leftover question marks
1 parent b64e65f commit bb95905

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/Query.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,7 @@ public static function merge(string $uri, array $query):string{
183183
* @link https://github.com/guzzle/psr7/blob/c0dcda9f54d145bd4d062a6d15f54931a67732f9/src/Query.php#L9-L57
184184
*/
185185
public static function parse(string $querystring, int $urlEncoding = null):array{
186+
$querystring = trim($querystring, '?'); // handle leftover question marks (e.g. Twitter API "next_results")
186187

187188
if($querystring === ''){
188189
return [];

0 commit comments

Comments
 (0)