Skip to content

Commit f11a89f

Browse files
xtremevisionMichael Mussulis
andauthored
Fix for warning Trying to access array offset on value of type bool (#188)
Fix for warning Trying to access array offset on value of type bool --------- Co-authored-by: Michael Mussulis <michael@xtreme-vision.net>
1 parent ba53f7e commit f11a89f

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

Client.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1152,10 +1152,12 @@ public function __call($name, $args)
11521152

11531153
if ($this->isMulti) {
11541154
$execResponse = array_pop($response);
1155-
foreach ($queuedResponses as $key => $command) {
1156-
list($name, $arguments) = $command;
1157-
$response[] = $this->decode_reply($name, $execResponse[$key], $arguments);
1158-
}
1155+
if(!empty($execResponse)) {
1156+
foreach ($queuedResponses as $key => $command) {
1157+
list($name, $arguments) = $command;
1158+
$response[] = $this->decode_reply($name, $execResponse[$key], $arguments);
1159+
}
1160+
}
11591161
}
11601162
} catch (CredisException $e) {
11611163
// the connection on redis's side is likely in a bad state, force it closed to abort the pipeline/transaction

0 commit comments

Comments
 (0)