Make WC_Logger follow FS_CHMOD_FILE when file is created

When WC_Logger creates a file it should use the permissions defined in FS_CHMOD_FILE

See https://codex.wordpress.org/Editing_wp-config.php#Override_of_default_file_permissions
This commit is contained in:
Rasmus 2016-09-12 12:59:18 +02:00 committed by GitHub
parent 2d991ff1d1
commit 9e8670015e
1 changed files with 1 additions and 0 deletions

View File

@ -54,6 +54,7 @@ class WC_Logger {
}
if ( $this->_handles[ $handle ] = @fopen( wc_get_log_file_path( $handle ), $mode ) ) {
@chmod( wc_get_log_file_path( $handle ), FS_CHMOD_FILE );
return true;
}