diff --git a/iredis.php b/iredis.php index a69acf6..0c635eb 100644 --- a/iredis.php +++ b/iredis.php @@ -177,7 +177,7 @@ public function readReply() { $bulk_head = trim(fgets($this->connection, 512)); - if ($size == '-1') + if (substr($bulk_head, 1) == '-1') { $response[] = null; }