Skip to content

Commit

Permalink
Fix for warning Trying to access array offset on value of type bool (#…
Browse files Browse the repository at this point in the history
…188)

Fix for warning Trying to access array offset on value of type bool

---------

Co-authored-by: Michael Mussulis <[email protected]>
  • Loading branch information
xtremevision and Michael Mussulis authored Jul 4, 2024
1 parent ba53f7e commit f11a89f
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -1152,10 +1152,12 @@ public function __call($name, $args)

if ($this->isMulti) {
$execResponse = array_pop($response);
foreach ($queuedResponses as $key => $command) {
list($name, $arguments) = $command;
$response[] = $this->decode_reply($name, $execResponse[$key], $arguments);
}
if(!empty($execResponse)) {
foreach ($queuedResponses as $key => $command) {
list($name, $arguments) = $command;
$response[] = $this->decode_reply($name, $execResponse[$key], $arguments);
}
}
}
} catch (CredisException $e) {
// the connection on redis's side is likely in a bad state, force it closed to abort the pipeline/transaction
Expand Down

0 comments on commit f11a89f

Please sign in to comment.