Apply minor change in command serialization.

This commit is contained in:
Daniele Alessandri
2013-12-16 18:46:17 +01:00
parent feb69fb5f2
commit 1125dc1bdd
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -255,7 +255,7 @@ class StreamConnection extends AbstractConnection
$buffer = "*{$reqlen}\r\n\${$cmdlen}\r\n{$commandID}\r\n";
for ($i = 0; $i < $reqlen - 1; $i++) {
for ($i = 0, $reqlen--; $i < $reqlen; $i++) {
$argument = $arguments[$i];
$arglen = strlen($argument);
$buffer .= "\${$arglen}\r\n{$argument}\r\n";
@@ -35,7 +35,7 @@ class RequestSerializer implements RequestSerializerInterface
$buffer = "*{$reqlen}\r\n\${$cmdlen}\r\n{$commandID}\r\n";
for ($i = 0; $i < $reqlen - 1; $i++) {
for ($i = 0, $reqlen--; $i < $reqlen; $i++) {
$argument = $arguments[$i];
$arglen = strlen($argument);
$buffer .= "\${$arglen}\r\n{$argument}\r\n";