WordPress.org

Make WordPress Core

Opened 23 months ago

Closed 23 months ago

Last modified 23 months ago

#44158 closed defect (bug) (fixed)

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

Reported by: birgire Owned by: 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 23 months ago.

Download all attachments as: .zip

Change History (9)

@birgire
23 months ago

#1 @birgire
23 months ago

  • Keywords has-patch added

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

#2 @SergeyBiryukov
23 months ago

  • Milestone changed from Awaiting Review to 4.9.7

#3 @SergeyBiryukov
23 months 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
23 months 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
23 months ago

#44170 was marked as a duplicate.

#6 @desrosj
23 months ago

  • Milestone changed from 4.9.7 to 4.9.8

Moving all tickets in 4.9.7 to 4.9.8.

#7 @SergeyBiryukov
23 months ago

  • Milestone changed from 4.9.8 to 4.9.7

Moving already backported tickets back to 4.9.7.

#8 @birgire
23 months ago

#44205 was marked as a duplicate.

Note: See TracTickets for help on using tickets.