Skip to content

Commit c04ce81

Browse files
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. Built from https://develop.svn.wordpress.org/branches/4.9@43624 git-svn-id: http://core.svn.wordpress.org/branches/4.9@43453 1a063a9b-81f0-0310-95a4-ce76da25c4cd
1 parent 7296f06 commit c04ce81

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

wp-includes/user.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3449,7 +3449,7 @@ function wp_validate_user_request_key( $request_id, $key ) {
34493449
}
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

34553455
if ( empty( $key ) ) {

wp-includes/version.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*
55
* @global string $wp_version
66
*/
7-
$wp_version = '4.9.9-alpha-43622';
7+
$wp_version = '4.9.9-alpha-43624';
88

99
/**
1010
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.

0 commit comments

Comments
 (0)