Skip to content

Commit

Permalink
Site Health: Replace wp_get_upload_dir() with wp_upload_dir().
Browse files Browse the repository at this point in the history
`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
  • Loading branch information
ocean90 committed Sep 21, 2019
1 parent 31fca44 commit 01b6bd9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion wp-admin/includes/class-wp-debug-data.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ static function 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' );
Expand Down
2 changes: 1 addition & 1 deletion wp-includes/version.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 01b6bd9

Please sign in to comment.