Skip to content

Commit

Permalink
Merge branch 'feature/#432' into 000000-dev
Browse files Browse the repository at this point in the history
  • Loading branch information
raamdev committed Mar 14, 2015
2 parents ffe0f19 + b32350d commit b673f91
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions zencache/zencache.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -2052,9 +2052,13 @@ public function check_advanced_cache()
return; // Skip on plugin actions.

$cache_dir = $this->cache_dir(); // Current cache directory.
$advanced_cache_file = WP_CONTENT_DIR.'/advanced-cache.php';

if(!is_file($cache_dir.'/zc-advanced-cache'))
$this->add_advanced_cache();
// Fixes zero-byte advanced-cache.php bug related to migrating from Quick Cache
// See https://github.com/websharks/zencache/issues/432
if(!is_file($cache_dir.'/zc-advanced-cache')
|| !is_file($advanced_cache_file) || filesize($advanced_cache_file) === 0
) $this->add_advanced_cache();
}

/**
Expand Down

0 comments on commit b673f91

Please sign in to comment.