Make WordPress Core

Changeset 60360


Ignore:
Timestamp:
06/27/2025 09:28:23 PM (3 weeks ago)
Author:
SergeyBiryukov
Message:

Coding Standards: Explicitly return null in get_page_by_path().

This matches the documented @return type.

Follow-up to [37479].

Props justlevine.
See #63268.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/post.php

    r60300 r60360  
    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 );
Note: See TracChangeset for help on using the changeset viewer.