[wp-trac] [WordPress Trac] #22413: get_the_excerpt() missing a check on $post->post_excerpt

WordPress Trac noreply at wordpress.org
Sat Jun 28 04:00:17 UTC 2014


#22413: get_the_excerpt() missing a check on $post->post_excerpt
------------------------------+-----------------------
 Reporter:  johnjamesjacoby   |       Owner:
     Type:  defect (bug)      |      Status:  reopened
 Priority:  low               |   Milestone:  4.0
Component:  Warnings/Notices  |     Version:
 Severity:  minor             |  Resolution:
 Keywords:  has-patch         |     Focuses:
------------------------------+-----------------------

Comment (by wonderboymusic):

 If there's no `$post` after `get_post()`, it should return empty. That
 would occur if the function is called outside of the loop. The docs don't
 say it has to be called in the loop.

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


More information about the wp-trac mailing list