diff --git a/wp-admin/includes/class-wp-debug-data.php b/wp-admin/includes/class-wp-debug-data.php index 01a78c5f02..fefd67c9e4 100644 --- a/wp-admin/includes/class-wp-debug-data.php +++ b/wp-admin/includes/class-wp-debug-data.php @@ -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, ), ); diff --git a/wp-includes/version.php b/wp-includes/version.php index 26648aa7b9..24b95ca79e 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -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.