diff --git a/wp-includes/canonical.php b/wp-includes/canonical.php index a9570a1bdd..9315ba7fb7 100644 --- a/wp-includes/canonical.php +++ b/wp-includes/canonical.php @@ -77,18 +77,18 @@ function redirect_canonical( $requested_url = null, $do_redirect = true ) { return; } + // Notice fixing. + $original += array( + 'host' => '', + 'path' => '', + 'query' => '', + 'scheme' => '', + ); + $redirect = $original; $redirect_url = false; $redirect_obj = false; - // Notice fixing. - if ( ! isset( $redirect['path'] ) ) { - $redirect['path'] = ''; - } - if ( ! isset( $redirect['query'] ) ) { - $redirect['query'] = ''; - } - /* * If the original URL ended with non-breaking spaces, they were almost * certainly inserted by accident. Let's remove them, so the reader doesn't @@ -616,12 +616,12 @@ function redirect_canonical( $requested_url = null, $do_redirect = true ) { } // Notice prevention after new parse_url( $redirect_url ) calls - if ( ! isset( $redirect['path'] ) ) { - $redirect['path'] = ''; - } - if ( ! isset( $redirect['query'] ) ) { - $redirect['query'] = ''; - } + $redirect += array( + 'host' => '', + 'path' => '', + 'query' => '', + 'scheme' => '', + ); // Trailing /index.php. $redirect['path'] = preg_replace( '|/' . preg_quote( $wp_rewrite->index, '|' ) . '/*?$|', '/', $redirect['path'] ); diff --git a/wp-includes/version.php b/wp-includes/version.php index 0fa5926e83..07210aadcd 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.9-beta3-61135'; +$wp_version = '6.9-beta3-61136'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.