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.
Built from https://develop.svn.wordpress.org/trunk@46228


git-svn-id: http://core.svn.wordpress.org/trunk@46040 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Dominik Schilling 2019-09-21 15:49:57 +00:00
parent 31fca440bd
commit 01b6bd9f38
2 changed files with 2 additions and 2 deletions

View File

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

View File

@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.3-alpha-46227';
$wp_version = '5.3-alpha-46228';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.