Make WordPress Core

Changeset 43229


Ignore:
Timestamp:
05/10/2018 08:24:41 PM (7 years ago)
Author:
SergeyBiryukov
Message:

Privacy: Avoid a PHP notice in wp_ajax_wp_privacy_erase_personal_data(), make sure $eraser_key is always defined.

Props allendav.
Merges [43228] to the 4.9 branch.
Fixes #44040.

Location:
branches/4.9
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.9

  • branches/4.9/src/wp-admin/includes/ajax-actions.php

    r43157 r43229  
    41674167    } else {
    41684168        // No exporters, so we're done.
     4169        $exporter_key = '';
     4170
    41694171        $response = array(
    41704172            'data' => array(),
     
    41864188     * @param int    $request_id      The privacy request post ID associated with this request.
    41874189     * @param bool   $send_as_email   Whether the final results of the export should be emailed to the user.
    4188      * @param int    $exporter_key    The key (slug) of the exporter that provided this data.
     4190     * @param string $exporter_key    The key (slug) of the exporter that provided this data.
    41894191     */
    41904192    $response = apply_filters( 'wp_privacy_personal_data_export_page', $response, $exporter_index, $email_address, $page, $request_id, $send_as_email, $exporter_key );
     
    43834385    } else {
    43844386        // No erasers, so we're done.
     4387        $eraser_key = '';
     4388
    43854389        $response = array(
    43864390            'items_removed'  => false,
     
    44034407     * @param int    $page            The page for this response.
    44044408     * @param int    $request_id      The privacy request post ID associated with this request.
    4405      * @param int    $eraser_key      The key (slug) of the eraser that provided this data.
     4409     * @param string $eraser_key      The key (slug) of the eraser that provided this data.
    44064410     */
    44074411    $response = apply_filters( 'wp_privacy_personal_data_erasure_page', $response, $eraser_index, $email_address, $page, $request_id, $eraser_key );
Note: See TracChangeset for help on using the changeset viewer.