Skip to content

Commit

Permalink
Fix E_NOTICE level errors being triggered by unavailable change_notif…
Browse files Browse the repository at this point in the history
…ications_enable option
  • Loading branch information
raamdev committed Apr 23, 2014
1 parent 8d14a99 commit 05fe726
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions quick-cache/quick-cache.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit 05fe726

Please sign in to comment.