Make WordPress Core

Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#44158 closed defect (bug) (fixed)

Privacy: When path not created wp_mkdir_p() returns false, not WP_Error

Reported by: birgire's profile birgire Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 4.9.7 Priority: normal
Severity: normal Version: 4.9.6
Component: Privacy Keywords: has-patch
Focuses: administration Cc:

Description

In wp_privacy_generate_personal_data_export_file(), we have:

$result = wp_mkdir_p( $exports_dir );
if ( is_wp_error( $result ) ) {
	wp_send_json_error( $result->get_error_message() );
}

but the output of wp_mkdir_p() is only boolean.

Attachments (1)

44158.diff (638 bytes) - added by birgire 6 years ago.

Download all attachments as: .zip

Change History (9)

@birgire
6 years ago

#1 @birgire
6 years ago

  • Keywords has-patch added

44158.diff adjust the case when wp_mkdir_p() is unable to create the export folder.

#2 @SergeyBiryukov
6 years ago

  • Milestone changed from Awaiting Review to 4.9.7

#3 @SergeyBiryukov
6 years ago

  • Owner set to SergeyBiryukov
  • Resolution set to fixed
  • Status changed from new to closed

In 43299:

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.
Fixes #44158.

#4 @SergeyBiryukov
6 years ago

In 43300:

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.

#5 @iandunn
6 years ago

#44170 was marked as a duplicate.

#6 @desrosj
6 years ago

  • Milestone changed from 4.9.7 to 4.9.8

Moving all tickets in 4.9.7 to 4.9.8.

#7 @SergeyBiryukov
6 years ago

  • Milestone changed from 4.9.8 to 4.9.7

Moving already backported tickets back to 4.9.7.

#8 @birgire
6 years ago

#44205 was marked as a duplicate.

Note: See TracTickets for help on using tickets.