Skip to content

Commit 8b93dbe

Browse files
committed
Fix url_to_postid() fix
1 parent ed3cfb2 commit 8b93dbe

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/wp-includes/rewrite.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -504,14 +504,14 @@ function url_to_postid( $url ) {
504504
if ( is_string( $url_host ) ) {
505505
$url_host = str_replace( 'www.', '', $url_host );
506506
} else {
507-
return 0;
507+
$url_host = '';
508508
}
509509

510510
$home_url_host = parse_url( home_url(), PHP_URL_HOST );
511511
if ( is_string( $home_url_host ) ) {
512512
$home_url_host = str_replace( 'www.', '', $home_url_host );
513513
} else {
514-
return 0;
514+
$home_url_host = '';
515515
}
516516

517517
// Bail early if the URL does not belong to this site.

0 commit comments

Comments
 (0)