Explorar o código

Use an explicit index to add values to the multi-bulk reply array.

Daniele Alessandri %!s(int64=14) %!d(string=hai) anos
pai
achega
1e32f8aaa8
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      lib/Predis.php

+ 1 - 1
lib/Predis.php

@@ -617,7 +617,7 @@ class ResponseMultiBulkHandler implements IResponseHandler {
         if ($listLength > 0) {
             $reader = $connection->getResponseReader();
             for ($i = 0; $i < $listLength; $i++) {
-                $list[] = $reader->read($connection);
+                $list[$i] = $reader->read($connection);
             }
         }