[wp-trac] [WordPress Trac] #50847: update_post_thumbnail_cache returns notice when get_the_post_thumbnail used with ID after setup_postdata()

WordPress Trac noreply at wordpress.org
Fri Aug 21 10:55:00 UTC 2020


#50847: update_post_thumbnail_cache returns notice when get_the_post_thumbnail used
with ID after setup_postdata()
-----------------------------+------------------------------
 Reporter:  tomcent          |       Owner:  (none)
     Type:  defect (bug)     |      Status:  new
 Priority:  normal           |   Milestone:  Awaiting Review
Component:  Post Thumbnails  |     Version:  5.4.2
 Severity:  normal           |  Resolution:
 Keywords:  needs-patch      |     Focuses:
-----------------------------+------------------------------
Changes (by tomcent):

 * severity:  minor => normal


Comment:

 Replying to [ticket:50847 tomcent]:
 > update_post_thumbnail_cache gives notice on line 101: Trying to get
 property 'ID' of non-object
 >
 > Change in /wp-includes/post-thumbnail-template.php line 101
 >

 This is now **line 106** after the WP 5.5 update.
 The issue is still present on this version.

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


More information about the wp-trac mailing list