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:
parent
2d1e8ada5e
commit
39fff01a1f
@ -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' );
|
||||
|
Loading…
Reference in New Issue
Block a user