We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi,
Using Magento 2.4.6-p2 open source and colinmollenhour/credis v1.16.0. Using a command line script I am getting this error:
PHP Warning: Trying to access array offset on value of type bool in colinmollenhour/credis/Client.php on line 1156
Not sure why this is happening. Have not debugged in depth, but
$execResponse = array_pop($response);
is actually false, so doing:
if(!empty($execResponse)) { foreach ($queuedResponses as $key => $command) { list($name, $arguments) = $command; $response[] = $this->decode_reply($name, $execResponse[$key], $arguments); } }
suppresses the warning.
Michael.
The text was updated successfully, but these errors were encountered:
Suggested patch:
index b6f2eb5..37dfce5 100644 --- a/credis/Client.php +++ b/credis/Client.php @@ -1151,9 +1151,12 @@ 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) {
Sorry, something went wrong.
Please submit a PR so we can see if it passes the unit tests. Thanks!
No branches or pull requests
Hi,
Using Magento 2.4.6-p2 open source and colinmollenhour/credis v1.16.0. Using a command line script I am getting this error:
PHP Warning: Trying to access array offset on value of type bool in colinmollenhour/credis/Client.php on line 1156
Not sure why this is happening. Have not debugged in depth, but
$execResponse = array_pop($response);
is actually false, so doing:
suppresses the warning.
Michael.
The text was updated successfully, but these errors were encountered: