diff --git a/index-wp-redis.php b/index-wp-redis.php index d59c3c6bc97071b6cf446dc7414fd9933c80b20c..55899d271be47457ec3af2f719d8138af20210ac 100644 --- a/index-wp-redis.php +++ b/index-wp-redis.php @@ -38,7 +38,7 @@ try { } else // Fallback to predis5.2.php { - include("wp-content/plugins/wp-redis-cache/predis5.2.php"); //we need this to use Redis inside of PHP + include_once("wp-content/plugins/wp-redis-cache/predis5.2.php"); //we need this to use Redis inside of PHP $redis = new Predis_Client(); } diff --git a/wp-redis-cache/cache.php b/wp-redis-cache/cache.php index 9f8587d7819d05d2b11b18fc70e4a7f6d14cfdc5..e4dd76e4fc1e1db44e1f79997e47ea545fb14141 100644 --- a/wp-redis-cache/cache.php +++ b/wp-redis-cache/cache.php @@ -10,7 +10,8 @@ if($new == "publish") { $permalink = get_permalink( $post->ID ); -include("predis5.2.php"); //we need this to use Redis inside of PHP +// aaronstpierre: this needs to be include_once so as not to cauase a redeclaration error +include_once("predis5.2.php"); //we need this to use Redis inside of PHP $redis = new Predis_Client(); $redis_key = md5($permalink); @@ -21,4 +22,4 @@ $frontPage = get_home_url() . "/"; $redis_key = md5($frontPage); $redis->del($redis_key); } -} \ No newline at end of file +}