Skip to content
Snippets Groups Projects
Commit f914fcb9 authored by Benjamin Adams's avatar Benjamin Adams
Browse files

Merge pull request #8 from aaronstpierre/master

Added include_once to fix PHP Fatal Error on Predisexeption class redecl...
parents 3e93e42b 0fa46a83
Branches
No related tags found
No related merge requests found
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment