Skip to content
Snippets Groups Projects
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
Branches
No related tags found
No related merge requests found
...@@ -38,7 +38,7 @@ try { ...@@ -38,7 +38,7 @@ try {
} else // Fallback to predis5.2.php } 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(); $redis = new Predis_Client();
} }
......
...@@ -10,7 +10,8 @@ if($new == "publish") ...@@ -10,7 +10,8 @@ if($new == "publish")
{ {
$permalink = get_permalink( $post->ID ); $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 = new Predis_Client();
$redis_key = md5($permalink); $redis_key = md5($permalink);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment