Make WordPress Core

Changeset 43228 for trunk


Ignore:
Timestamp:
05/10/2018 08:23:33 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.
Fixes #44040.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/ajax-actions.php

    r43154 r43228  
    44774477    } else {
    44784478        // No exporters, so we're done.
     4479        $exporter_key = '';
     4480
    44794481        $response = array(
    44804482            'data' => array(),
     
    44964498     * @param int    $request_id      The privacy request post ID associated with this request.
    44974499     * @param bool   $send_as_email   Whether the final results of the export should be emailed to the user.
    4498      * @param int    $exporter_key    The key (slug) of the exporter that provided this data.
     4500     * @param string $exporter_key    The key (slug) of the exporter that provided this data.
    44994501     */
    45004502    $response = apply_filters( 'wp_privacy_personal_data_export_page', $response, $exporter_index, $email_address, $page, $request_id, $send_as_email, $exporter_key );
     
    46934695    } else {
    46944696        // No erasers, so we're done.
     4697        $eraser_key = '';
     4698
    46954699        $response = array(
    46964700            'items_removed'  => false,
     
    47134717     * @param int    $page            The page for this response.
    47144718     * @param int    $request_id      The privacy request post ID associated with this request.
    4715      * @param int    $eraser_key      The key (slug) of the eraser that provided this data.
     4719     * @param string $eraser_key      The key (slug) of the eraser that provided this data.
    47164720     */
    47174721    $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.