[wp-trac] [WordPress Trac] #44497: get_page_link() doesn't check if a valid post object is returned before trying to access its properties

WordPress Trac noreply at wordpress.org
Fri Jul 6 14:56:01 UTC 2018


#44497: get_page_link() doesn't check if a valid post object is returned before
trying to access its properties
-------------------------------+------------------------------
 Reporter:  rodrigosprimo      |       Owner:  (none)
     Type:  defect (bug)       |      Status:  new
 Priority:  normal             |   Milestone:  Awaiting Review
Component:  Posts, Post Types  |     Version:
 Severity:  normal             |  Resolution:
 Keywords:                     |     Focuses:
-------------------------------+------------------------------

Comment (by bartech101):

 Diff to return _doing_it_wrong( __FUNCTION__, __( 'Invalid post ID.' ),
 '4.9.7' ); if $post is null

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/44497#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list