Skip to content

Commit 99499d8

Browse files
Coding Standards: Explicitly return null in get_page_by_path().
This matches the documented `@return` type. Follow-up to [37479]. Props justlevine. See #63268. git-svn-id: https://develop.svn.wordpress.org/trunk@60360 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 5d5235f commit 99499d8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/wp-includes/post.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6109,7 +6109,7 @@ function get_page_by_path( $page_path, $output = OBJECT, $post_type = 'page' ) {
61096109
if ( false !== $cached ) {
61106110
// Special case: '0' is a bad `$page_path`.
61116111
if ( '0' === $cached || 0 === $cached ) {
6112-
return;
6112+
return null;
61136113
} else {
61146114
return get_post( $cached, $output );
61156115
}

0 commit comments

Comments
 (0)