WordPress.org

Make WordPress Core

Changeset 49026


Ignore:
Timestamp:
09/21/2020 01:49:07 PM (10 months ago)
Author:
SergeyBiryukov
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/privacy-tools.php

    r48616 r49026  
    768768        update_post_meta( $request_id, '_export_data_raw', $export_data );
    769769    } else {
    770         $export_data = get_post_meta( $request_id, '_export_data_raw', true );
     770        $accumulated_data = get_post_meta( $request_id, '_export_data_raw', true );
     771
     772        if ( $accumulated_data ) {
     773            $export_data = $accumulated_data;
     774        }
    771775    }
    772776
Note: See TracChangeset for help on using the changeset viewer.