WordPress.org

Make WordPress Core

Ticket #44497: 44497.patch

File 44497.patch, 638 bytes (added by bartech101, 3 years ago)
  • wp-includes/link-template.php

    diff --git a/wp-includes/link-template.php b/wp-includes/link-template.php
    index 815c539a4a..555665d476 100644
    a b function get_post_permalink( $id = 0, $leavename = false, $sample = false ) { 
    327327function get_page_link( $post = false, $leavename = false, $sample = false ) {
    328328        $post = get_post( $post );
    329329
     330        if ( is_null( $post ) ) {
     331                return _doing_it_wrong( __FUNCTION__, __( 'Invalid post ID.' ), '4.9.7' );
     332        }
    330333        if ( 'page' == get_option( 'show_on_front' ) && $post->ID == get_option( 'page_on_front' ) ) {
    331334                $link = home_url( '/' );
    332335        } else {