WordPress.org

Make WordPress Core

Changeset 43624


Ignore:
Timestamp:
09/03/2018 09:46:48 PM (12 months ago)
Author:
SergeyBiryukov
Message:

Privacy: When clicking a confirmation link for a privacy request, return a WP_Error object if the link has expired.

Returning a string caused a success message to be displayed instead of the correct error message.

Props desrosj.
Merges [43623] to the 4.9 branch.
Fixes #44685.

Location:
branches/4.9
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.9

  • branches/4.9/src/wp-includes/user.php

    r43614 r43624  
    34503450
    34513451    if ( ! in_array( $request->status, array( 'request-pending', 'request-failed' ), true ) ) {
    3452         return __( 'This link has expired.' );
     3452        return new WP_Error( 'expired_link', __( 'This link has expired.' ) );
    34533453    }
    34543454
Note: See TracChangeset for help on using the changeset viewer.