From 5b89607e4bd256f0b13731ad58f958160f8b39aa Mon Sep 17 00:00:00 2001 From: Matt Heath Date: Thu, 10 May 2012 15:01:00 +0100 Subject: [PATCH] Fix issue #19 by ensuring RedisException is not redeclared --- lib/Redisent/Redisent.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/Redisent/Redisent.php b/lib/Redisent/Redisent.php index 19f5cdf..1580b89 100644 --- a/lib/Redisent/Redisent.php +++ b/lib/Redisent/Redisent.php @@ -11,8 +11,11 @@ define('CRLF', sprintf('%s%s', chr(13), chr(10))); /** * Wraps native Redis errors in friendlier PHP exceptions + * Only declared if class doesn't already exist to ensure compatibility with php-redis */ -class RedisException extends Exception { +if (! class_exists('RedisException')) { + class RedisException extends Exception { + } } /**