We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4505159 commit 0ba6e32Copy full SHA for 0ba6e32
redis.php
@@ -65,7 +65,7 @@ function _reply($fp)
65
$reply_type = $reply[0];
66
$data = substr($reply, 1);
67
68
- switch($reply[0])
+ switch($reply_type)
69
{
70
case STATUS_REPLY:
71
if ('ok' == strtolower($data)) return true;
@@ -88,7 +88,7 @@ function _reply($fp)
88
$bulk_reply_count = intval($data);
89
if ($bulk_reply_count < 0) return NULL;
90
$multi_bulk_reply = array();
91
- foreach(range(1, $bulk_reply_count) as $i) $multi_bulk_reply[] = _reply($fp);
+ for($i = 0; $i < $bulk_reply_count; $i++) $multi_bulk_reply[] = _reply($fp);
92
return $multi_bulk_reply;
93
94
default:
0 commit comments