From 39fff01a1f4908ab5300aeca251eee5a82e14cd4 Mon Sep 17 00:00:00 2001 From: Dominik Schilling Date: Sat, 21 Sep 2019 15:48:56 +0000 Subject: [PATCH] Site Health: Replace `wp_get_upload_dir()` with `wp_upload_dir()`. `wp_get_upload_dir()` returns the theoretical path of the uploads directory. When there was no upload yet the test returns an incorrect result (not writeable) because the directory doesn't exist. Switching to `wp_upload_dir()`, which creates the directory on the fly, ensures a proper test result. Fixes #47958. git-svn-id: https://develop.svn.wordpress.org/trunk@46228 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/class-wp-debug-data.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-admin/includes/class-wp-debug-data.php b/src/wp-admin/includes/class-wp-debug-data.php index 0039759ec9..4708e6187c 100644 --- a/src/wp-admin/includes/class-wp-debug-data.php +++ b/src/wp-admin/includes/class-wp-debug-data.php @@ -33,7 +33,7 @@ class WP_Debug_Data { global $wpdb; // Save few function calls. - $upload_dir = wp_get_upload_dir(); + $upload_dir = wp_upload_dir(); $permalink_structure = get_option( 'permalink_structure' ); $is_ssl = is_ssl(); $users_can_register = get_option( 'users_can_register' );