WordPress.org

Make WordPress Core

Ticket #23428: comment-template.diff

File comment-template.diff, 448 bytes (added by willnorris, 2 years ago)
  • wp-includes/comment-template.php

     
    773773 
    774774        $_post = get_post($post_id); 
    775775 
    776         $open = ( 'open' == $_post->comment_status ); 
     776        $open = ( null != $_post && 'open' == $_post->comment_status ); 
    777777        return apply_filters( 'comments_open', $open, $post_id ); 
    778778} 
    779779