Commit 0fa46a83 authored by Aaron J. St. Piere's avatar Aaron J. St. Piere
Browse files

Added include_once to fix PHP Fatal Error on Predisexeption class redeclaration

parent 3e93e42b
......@@ -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();
}
......
......@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment