From 05fe7264f9a1bb92c4f55901c3381ac68bf353e3 Mon Sep 17 00:00:00 2001 From: Raam Dev Date: Wed, 23 Apr 2014 18:38:04 -0400 Subject: [PATCH] Fix E_NOTICE level errors being triggered by unavailable change_notifications_enable option --- quick-cache/quick-cache.inc.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/quick-cache/quick-cache.inc.php b/quick-cache/quick-cache.inc.php index def8c6a..5b95737 100644 --- a/quick-cache/quick-cache.inc.php +++ b/quick-cache/quick-cache.inc.php @@ -558,7 +558,7 @@ public function auto_purge_post_cache($id) throw new \exception(sprintf(__('Unable to auto-purge file: `%1$s`.', $this->text_domain), $_file->getPathname())); $counter++; // Increment counter for each file purge. - if(!empty($_notices) || !$this->options['change_notifications_enable'] || !is_admin()) + if(!empty($_notices) || !is_admin()) continue; // Stop here; we already issued a notice, or this notice is N/A. $_notices = (is_array($_notices = get_option(__NAMESPACE__.'_notices'))) ? $_notices : array(); @@ -600,7 +600,7 @@ public function auto_purge_home_page_cache() throw new \exception(sprintf(__('Unable to auto-purge file: `%1$s`.', $this->text_domain), $_file->getPathname())); $counter++; // Increment counter for each file purge. - if(!empty($_notices) || !$this->options['change_notifications_enable'] || !is_admin()) + if(!empty($_notices) || !is_admin()) continue; // Stop here; we already issued a notice, or this notice is N/A. $_notices = (is_array($_notices = get_option(__NAMESPACE__.'_notices'))) ? $_notices : array(); @@ -655,7 +655,7 @@ public function auto_purge_posts_page_cache() throw new \exception(sprintf(__('Unable to auto-purge file: `%1$s`.', $this->text_domain), $_file->getPathname())); $counter++; // Increment counter for each file purge. - if(!empty($_notices) || !$this->options['change_notifications_enable'] || !is_admin()) + if(!empty($_notices) || !is_admin()) continue; // Stop here; we already issued a notice, or this notice is N/A. $_notices = (is_array($_notices = get_option(__NAMESPACE__.'_notices'))) ? $_notices : array(); @@ -772,7 +772,7 @@ public function auto_purge_post_terms_cache($id) throw new \exception(sprintf(__('Unable to auto-purge file: `%1$s`.', $this->text_domain), $_file->getPathname())); $counter++; // Increment counter for each file purge. - if(!empty($_notices) || !$this->options['change_notifications_enable'] || !is_admin()) + if(!empty($_notices) || !is_admin()) continue; // Stop here; we already issued a notice, or this notice is N/A. $_notices = (is_array($_notices = get_option(__NAMESPACE__.'_notices'))) ? $_notices : array();