From f3e720227c9d17663202102ac9720884833430c2 Mon Sep 17 00:00:00 2001
From: Vasili Pascal <vasilii.pascal@gmail.com>
Date: Fri, 29 Nov 2013 11:31:25 +0200
Subject: [PATCH] Update index-wp-redis.php

PHP Notice:  Constant WP_USE_THEMES already defined in /var/www/sites/webdirect.me/docroot/index-wp-redis.php on line 27.
---
 index-wp-redis.php | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/index-wp-redis.php b/index-wp-redis.php
index 55899d2..8676ce6 100644
--- a/index-wp-redis.php
+++ b/index-wp-redis.php
@@ -23,8 +23,11 @@ $secret_string       = "changeme";
 if (isset($_SERVER['HTTP_CF_CONNECTING_IP'])) {
     $_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_CF_CONNECTING_IP'];
 }
+ 
+if(!defined('WP_USE_THEMES')) {
+    define('WP_USE_THEMES', true);
+}
 
-define('WP_USE_THEMES', true);
 $current_url = str_replace(array("?refresh=${secret_string}","&refresh=${secret_string}"), '', "http://${_SERVER['HTTP_HOST']}${_SERVER['REQUEST_URI']}"); //clean up the URL
 $redis_key = md5($current_url);
 
-- 
GitLab