Skip to content

Commit

Permalink
correct warning
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastienserre committed Jan 1, 2024
1 parent 7aa146d commit 2aa0c9e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/wp-includes/canonical.php
Original file line number Diff line number Diff line change
Expand Up @@ -717,7 +717,9 @@ function redirect_canonical( $requested_url = null, $do_redirect = true ) {
$redirect['host'] = $original['host'];
}

$compare_original = array( $original['host'], $original['path'] );
if ( ! empty( $original['host'] ) ) {
$compare_original = array( $original['host'], $original['path'] );
}

if ( ! empty( $original['port'] ) ) {
$compare_original[] = $original['port'];
Expand Down

0 comments on commit 2aa0c9e

Please sign in to comment.