diff --git a/wp-ffpc-class.php b/wp-ffpc-class.php index d1c0bb2..ff5e33c 100644 --- a/wp-ffpc-class.php +++ b/wp-ffpc-class.php @@ -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 );