Make WordPress Core


Ignore:
Timestamp:
09/21/2019 03:48:56 PM (6 years ago)
Author:
ocean90
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-debug-data.php

    r45932 r46228  
    3434
    3535        // Save few function calls.
    36         $upload_dir             = wp_get_upload_dir();
     36        $upload_dir             = wp_upload_dir();
    3737        $permalink_structure    = get_option( 'permalink_structure' );
    3838        $is_ssl                 = is_ssl();
Note: See TracChangeset for help on using the changeset viewer.