mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-01 05:57:55 +01:00
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. Built from https://develop.svn.wordpress.org/branches/4.9@43300 git-svn-id: http://core.svn.wordpress.org/branches/4.9@43129 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
09734c5576
commit
4d9aadc80c
@ -1889,9 +1889,8 @@ function wp_privacy_generate_personal_data_export_file( $request_id ) {
|
|||||||
$exports_dir = wp_privacy_exports_dir();
|
$exports_dir = wp_privacy_exports_dir();
|
||||||
$exports_url = wp_privacy_exports_url();
|
$exports_url = wp_privacy_exports_url();
|
||||||
|
|
||||||
$result = wp_mkdir_p( $exports_dir );
|
if ( ! wp_mkdir_p( $exports_dir ) ) {
|
||||||
if ( is_wp_error( $result ) ) {
|
wp_send_json_error( __( 'Unable to create export folder.' ) );
|
||||||
wp_send_json_error( $result->get_error_message() );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Protect export folder from browsing.
|
// Protect export folder from browsing.
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '4.9.7-alpha-43298';
|
$wp_version = '4.9.7-alpha-43300';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
Loading…
Reference in New Issue
Block a user