Check that WP_CONTENT_DIR and advanced-cache.php are writable
This commit is contained in:
parent
e693b4d43e
commit
cde9dec396
1 changed files with 8 additions and 0 deletions
|
@ -975,6 +975,14 @@ class WP_FFPC extends PluginAbstract {
|
|||
*/
|
||||
private function deploy_advanced_cache( ) {
|
||||
|
||||
/* check that WP_CONTENT_DIR is writable */
|
||||
if ( ! @is_writable( WP_CONTENT_DIR ))
|
||||
return false;
|
||||
|
||||
/* check that advanced-cache.php is writable if advanced-cache.php exists */
|
||||
if ( @file_exists( $this->acache ) && ! @is_writable( $this->acache ))
|
||||
return false;
|
||||
|
||||
/* if no active site left no need for advanced cache :( */
|
||||
if ( empty ( $this->global_config ) ) {
|
||||
unlink ( $this->acache );
|
||||
|
|
Loading…
Reference in a new issue