WordPress.org

Make WordPress Core

Changeset 43623


Ignore:
Timestamp:
09/03/2018 09:43:13 PM (15 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.
Fixes #44685.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/user.php

    r43571 r43623  
    35463546
    35473547    if ( ! in_array( $request->status, array( 'request-pending', 'request-failed' ), true ) ) {
    3548         return __( 'This link has expired.' );
     3548        return new WP_Error( 'expired_link', __( 'This link has expired.' ) );
    35493549    }
    35503550
Note: See TracChangeset for help on using the changeset viewer.