Site Health: Use wp_get_upload_dir() instead of wp_upload_dir(), remove duplicate call.

Props m_uysl.
Fixes #46729.
Built from https://develop.svn.wordpress.org/trunk@45108


git-svn-id: http://core.svn.wordpress.org/trunk@44917 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2019-04-03 11:20:51 +00:00
parent 991eb4258d
commit 4ee7d453fa
2 changed files with 5 additions and 6 deletions

View File

@ -40,7 +40,8 @@ class WP_Debug_Data {
}
}
$upload_dir = wp_upload_dir();
$upload_dir = wp_get_upload_dir();
if ( file_exists( ABSPATH . 'wp-config.php' ) ) {
$wp_config_path = ABSPATH . 'wp-config.php';
// phpcs:ignore Generic.PHP.NoSilencedErrors.Discouraged
@ -313,9 +314,6 @@ class WP_Debug_Data {
$size_db = WP_Debug_Data::get_database_size();
// Go through the various installation directories and calculate their sizes.
$uploads_dir = wp_upload_dir();
/*
* We will be using the PHP max execution time to prevent the size calculations
* from causing a timeout. The default value is 30 seconds, and some
@ -338,6 +336,7 @@ class WP_Debug_Data {
$max_execution_time -= 1;
}
// Go through the various installation directories and calculate their sizes.
$size_directories = array(
'wordpress' => array(
'path' => ABSPATH,
@ -352,7 +351,7 @@ class WP_Debug_Data {
'size' => 0,
),
'uploads' => array(
'path' => $uploads_dir['basedir'],
'path' => $upload_dir['basedir'],
'size' => 0,
),
);

View File

@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.2-beta1-45107';
$wp_version = '5.2-beta1-45108';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.