diff --git a/Client/Phpredis/Client.php b/Client/Phpredis/Client.php index b826de88..c0879c49 100644 --- a/Client/Phpredis/Client.php +++ b/Client/Phpredis/Client.php @@ -62,8 +62,13 @@ private function call($name, array $arguments = array()) $startTime = microtime(true); $result = call_user_func_array("parent::$name", $arguments); $duration = (microtime(true) - $startTime) * 1000; + + $error = false; + if (false === $result) { + $error = call_user_func('parent::getLastError'); + } - $this->logger->logCommand($this->getCommandString($name, $arguments), $duration, $this->alias, false); + $this->logger->logCommand($this->getCommandString($name, $arguments), $duration, $this->alias, $error); return $result; }