Skip to content

Commit 9dd35c8

Browse files
author
lipengcheng
committed
修复http Get请求参数
1 parent 0ea7886 commit 9dd35c8

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/Client/Http/Client.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ public function goGet($url = '', $query = null, $timeout = 30000, $headers = [])
329329
}
330330

331331
if (!empty($query)) {
332-
$q .= empty($q) ? '' : '&' . http_build_query($query) ;
332+
$q .= (empty($q) ? '' : '&') . http_build_query($query) ;
333333
}
334334

335335
$sendGetReq = $this->getObject(Http::class, [$this, 'GET', $this->urlData['path'], $q, $timeout]);
@@ -443,7 +443,7 @@ public function goSingleGet($url = '', $query = [], $timeout = 30000, $headers =
443443
}
444444

445445
if (!empty($query)) {
446-
$q .= empty($q) ? '' : '&' . http_build_query($query) ;
446+
$q .= (empty($q) ? '' : '&') . http_build_query($query) ;
447447
}
448448

449449
return yield $this->getObject(Http::class, [$this, 'GET', $this->urlData['path'], $q, $timeout]);

0 commit comments

Comments
 (0)