[wp-trac] [WordPress Trac] #17037: get_the_title() will pass an empty title and invalid post ID to 'the_title' filter on invalid post ID

WordPress Trac noreply at wordpress.org
Fri Aug 16 02:22:05 UTC 2013


#17037: get_the_title() will pass an empty title and invalid post ID to 'the_title'
filter on invalid post ID
--------------------------+------------------------------
 Reporter:  kawauso       |       Owner:
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Template      |     Version:
 Severity:  normal        |  Resolution:  invalid
 Keywords:                |
--------------------------+------------------------------
Changes (by c3mdigital):

 * keywords:  has-patch =>
 * status:  new => closed
 * version:  3.1 =>
 * resolution:   => invalid


Comment:

 Couldn't this be handled by doing a check  if ( '0' == $post_id ) in your
 get_the_title filter?  And I also fail to see why you would want a default
 title for a post that doesn't exist.

--
Ticket URL: <http://core.trac.wordpress.org/ticket/17037#comment:3>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list