Make WordPress Core


Ignore:
Timestamp:
05/21/2018 12:01:40 PM (7 years ago)
Author:
SergeyBiryukov
Message:

Privacy: Correct the error check when creating an export folder in wp_privacy_generate_personal_data_export_file().

wp_mkdir_p() returns false on error, not a WP_Error object.

Props birgire.
Merges [43299] to the 4.9 branch.
Fixes #44158.

Location:
branches/4.9
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.9

  • branches/4.9/src/wp-admin/includes/file.php

    r43285 r43300  
    18901890    $exports_url = wp_privacy_exports_url();
    18911891
    1892     $result = wp_mkdir_p( $exports_dir );
    1893     if ( is_wp_error( $result ) ) {
    1894         wp_send_json_error( $result->get_error_message() );
     1892    if ( ! wp_mkdir_p( $exports_dir ) ) {
     1893        wp_send_json_error( __( 'Unable to create export folder.' ) );
    18951894    }
    18961895
Note: See TracChangeset for help on using the changeset viewer.