Skip to content

Commit 28a98d7

Browse files
author
Chris Boulton
committed
Merge pull request chrisboulton#56 from vaxltd/issue19/redeclare-redisexception
Ensure RedisException is not redeclared to allow PHPRedis compatibility
2 parents 905c396 + 5b89607 commit 28a98d7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/Redisent/Redisent.php

+4-1
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,11 @@
1111

1212
/**
1313
* Wraps native Redis errors in friendlier PHP exceptions
14+
* Only declared if class doesn't already exist to ensure compatibility with php-redis
1415
*/
15-
class RedisException extends Exception {
16+
if (! class_exists('RedisException')) {
17+
class RedisException extends Exception {
18+
}
1619
}
1720

1821
/**

0 commit comments

Comments
 (0)