[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 wp-trac at lists.automattic.com
Mon Apr 4 08:16:24 UTC 2011


#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:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Template      |     Version:  3.1
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |
--------------------------+------------------------------
Changes (by solarissmoke):

 * keywords:  needs-patch => has-patch


Comment:

 This was done in #11435:

 > Fix notices in get_the_title() when passed an invalid id. Also ensure
 that the filter gets the invalid id so a plugin can supply a default title
 instead.

 I 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:2>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list