Privacy: Check if the accumulated data in `wp_privacy_process_personal_data_export_page()` is not empty.

This avoids an error on PHP 8 caused by passing an empty string to `array_merge()`, instead of an array.

See #50913.
Built from https://develop.svn.wordpress.org/trunk@49026


git-svn-id: http://core.svn.wordpress.org/trunk@48788 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2020-09-21 13:51:03 +00:00
parent a95e9a91da
commit 29c0edfbba
2 changed files with 6 additions and 2 deletions

View File

@ -767,7 +767,11 @@ function wp_privacy_process_personal_data_export_page( $response, $exporter_inde
if ( 1 === $exporter_index && 1 === $page ) {
update_post_meta( $request_id, '_export_data_raw', $export_data );
} else {
$export_data = get_post_meta( $request_id, '_export_data_raw', true );
$accumulated_data = get_post_meta( $request_id, '_export_data_raw', true );
if ( $accumulated_data ) {
$export_data = $accumulated_data;
}
}
// Now, merge the data from the exporter response into the data we have accumulated already.

View File

@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.6-alpha-49025';
$wp_version = '5.6-alpha-49026';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.