Check that WP_CONTENT_DIR and advanced-cache.php are writable

This commit is contained in:
Hiroshi Shimoju 2015-02-03 13:54:47 +09:00
parent e693b4d43e
commit cde9dec396

View file

@ -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 );