From 9e8670015e38767520e7e4ca6287da9cd82463c7 Mon Sep 17 00:00:00 2001 From: Rasmus Date: Mon, 12 Sep 2016 12:59:18 +0200 Subject: [PATCH] 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 --- includes/class-wc-logger.php | 1 + 1 file changed, 1 insertion(+) diff --git a/includes/class-wc-logger.php b/includes/class-wc-logger.php index 34a54b41207..e1d9a3aa8d5 100644 --- a/includes/class-wc-logger.php +++ b/includes/class-wc-logger.php @@ -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; }