diff --git a/src/Illuminate/Http/Client/PendingRequest.php b/src/Illuminate/Http/Client/PendingRequest.php index 6ce316cc7c3b..ff0213324772 100644 --- a/src/Illuminate/Http/Client/PendingRequest.php +++ b/src/Illuminate/Http/Client/PendingRequest.php @@ -589,7 +589,7 @@ public function dd() */ public function get(string $url, $query = null) { - return $this->send('GET', $url, [ + return $this->send('GET', $url, func_num_args() === 1 ? [] : [ 'query' => $query, ]); } @@ -603,7 +603,7 @@ public function get(string $url, $query = null) */ public function head(string $url, $query = null) { - return $this->send('HEAD', $url, [ + return $this->send('HEAD', $url, func_num_args() === 1 ? [] : [ 'query' => $query, ]); }