Skip to content

Commit

Permalink
Fix issue with incorrect returning code in some cases
Browse files Browse the repository at this point in the history
  • Loading branch information
donhardman committed Dec 25, 2024
1 parent beafa89 commit 2a1afce
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/ManticoreSearch/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,10 @@ public function sendRequest(
* @return array<Response>
*/
public function sendMultiRequest(array $requests): array {
if (sizeof($requests) === 0) {
if (sizeof($requests) === 1) {
$request = array_pop($requests);
return $this->sendRequestToUrl(...$request);
$response = $this->sendRequestToUrl(...$request);
return [$response];
}
$requestCount = sizeof($requests);
$channel = new Channel($requestCount);
Expand Down

0 comments on commit 2a1afce

Please sign in to comment.