Skip to content

Commit 1840119

Browse files
committed
code quality: fix usage of remove_query_arg() in wp-activate.php
remove_query_arg() only takes `string|string[]`. Added a comment because it took me 5 minutes to understand _why_ we were using
1 parent 57bd6af commit 1840119

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/wp-activate.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@
3737
if ( $key ) {
3838
$redirect_url = remove_query_arg( 'key' );
3939

40-
if ( remove_query_arg( false ) !== $redirect_url ) {
40+
// If we still have query args, stash the key and redirect to handle them.
41+
if ( remove_query_arg( '' ) !== $redirect_url ) {
4142
setcookie( $activate_cookie, $key, 0, $activate_path, COOKIE_DOMAIN, is_ssl(), true );
4243
wp_safe_redirect( $redirect_url );
4344
exit;

0 commit comments

Comments
 (0)