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
  • Loading branch information
Michael Mussulis committed May 20, 2024
1 parent ba53f7e commit b026adb
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -1152,10 +1152,13 @@ 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 b026adb

Please sign in to comment.