diff --git a/wp-includes/rewrite.php b/wp-includes/rewrite.php index 0c92446d0c..329e0ac91f 100644 --- a/wp-includes/rewrite.php +++ b/wp-includes/rewrite.php @@ -487,7 +487,8 @@ function url_to_postid( $url ) { $url = $url_split[0]; // Set the correct URL scheme. - $url = set_url_scheme( $url ); + $scheme = parse_url( home_url(), PHP_URL_SCHEME ); + $url = set_url_scheme( $url, $scheme ); // Add 'www.' if it is absent and should be there if ( false !== strpos(home_url(), '://www.') && false === strpos($url, '://www.') ) diff --git a/wp-includes/version.php b/wp-includes/version.php index 8d3be1a008..c3a51fb856 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.5-beta1-36749'; +$wp_version = '4.5-beta1-36750'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.