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
This commit is contained in:
Dominik Schilling 2019-09-21 15:48:56 +00:00
parent 2d1e8ada5e
commit 39fff01a1f
1 changed files with 1 additions and 1 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' );