Permalink
Browse files

Don't error_log about the non-existent Redis server

  • Loading branch information...
1 parent 1b68e4f commit 9d1a8d3d5f9640c799506f087b45d39593f2a21e @ginatrapani ginatrapani committed Dec 27, 2013
@@ -140,7 +140,7 @@ private function addOptionForm() {
/**
* Do we have redis support?
- * @returns boolean
+ * @returns bool
*/
private function isRedisSupported() {
$version = explode('.', PHP_VERSION);
@@ -159,9 +159,13 @@ private function isRedisSupported() {
try {
$resp = $redis->ping();
$redis_status = true;
- }
- catch (Exception $e) {
- error_log("Exception: " . $e->getMessage() . ". Check that the Redis server is running.");
+ } catch (Exception $e) {
+ if (get_class($e) == "Predis\CommunicationException") { //for php 5.2
+ $this->addErrorMessage(get_class($e).": " . $e->getMessage() .
+ ". Check that the Redis server is running.");
+ } else {
+ throw $e;
+ }
}
}
return $redis_status;

0 comments on commit 9d1a8d3

Please sign in to comment.