Ticket #58940: 58940.diff
File 58940.diff, 1.7 KB (added by , 2 years ago) |
---|
-
src/wp-admin/includes/class-wp-site-health.php
2009 2009 'test' => 'update_temp_backup_writable', 2010 2010 ); 2011 2011 2012 if ( ! $wp_filesystem) {2012 if ( ! function_exists( 'WP_Filesystem' ) ) { 2013 2013 require_once ABSPATH . '/wp-admin/includes/file.php'; 2014 WP_Filesystem();2015 2014 } 2016 2015 2016 ob_start(); 2017 $credentials = request_filesystem_credentials( '' ); 2018 ob_end_clean(); 2019 2020 if ( false === $credentials || ! WP_Filesystem( $credentials ) ) { 2021 $result['status'] = 'critical'; 2022 $result['label'] = __( 'Could not access filesystem' ); 2023 $result['description'] = __( 'Unable to connect to the filesystem. Please confirm your credentials.' ); 2024 return $result; 2025 } 2026 2017 2027 $wp_content = $wp_filesystem->wp_content_dir(); 2018 2028 2019 2029 if ( ! $wp_content ) { -
src/wp-includes/update.php
1113 1113 function _wp_delete_all_temp_backups() { 1114 1114 global $wp_filesystem; 1115 1115 1116 if ( ! $wp_filesystem) {1116 if ( ! function_exists( 'WP_Filesystem' ) ) { 1117 1117 require_once ABSPATH . '/wp-admin/includes/file.php'; 1118 WP_Filesystem();1119 1118 } 1120 1119 1120 ob_start(); 1121 $credentials = request_filesystem_credentials( '' ); 1122 ob_end_clean(); 1123 1124 if ( false === $credentials || ! WP_Filesystem( $credentials ) ) { 1125 return new WP_Error( 'fs_unavailable', __( 'Could not access filesystem.' ) ); 1126 } 1127 1121 1128 if ( ! $wp_filesystem->wp_content_dir() ) { 1122 1129 return new WP_Error( 1123 1130 'fs_no_content_dir',