From 85936b3c20cc06ea527e85e3389d7a20b696a50f Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Wed, 16 Nov 2011 13:08:22 -0600 Subject: [PATCH] Fix bug and shorten exception message. --- laravel/redis.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/laravel/redis.php b/laravel/redis.php index 85da0511..a4bd8459 100644 --- a/laravel/redis.php +++ b/laravel/redis.php @@ -93,25 +93,25 @@ public function run($method, $parameters) { fwrite($this->connect(), $this->command($method, (array) $parameters)); - $ersponse = trim(fgets($this->connection, 512)); + $response = trim(fgets($this->connection, 512)); - switch (substr($ersponse, 0, 1)) + switch (substr($response, 0, 1)) { case '-': - throw new \RuntimeException('Redis error: '.substr(trim($ersponse), 4)); + throw new \RuntimeException('Redis error: '.substr(trim($response), 4)); case '+': case ':': - return $this->inline($ersponse); + return $this->inline($response); case '$': - return $this->bulk($ersponse); + return $this->bulk($response); case '*': - return $this->multibulk($ersponse); + return $this->multibulk($response); default: - throw new \UnexpectedValueException("Unknown response from Redis server: ".substr($ersponse, 0, 1)); + throw new \UnexpectedValueException("Unknown Redis response: ".substr($response, 0, 1)); } } @@ -261,4 +261,4 @@ public function __destruct() fclose($this->connection); } -} +} \ No newline at end of file