[wp-trac] [WordPress Trac] #23255: get_post_format() can throw PHP notice and doesn't return WP_Error

WordPress Trac noreply at wordpress.org
Mon Jan 21 22:37:16 UTC 2013


#23255: get_post_format() can throw PHP notice and doesn't return WP_Error
--------------------------+------------------
 Reporter:  azaozz        |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  3.6
Component:  General       |     Version:
 Severity:  normal        |  Resolution:
 Keywords:                |
--------------------------+------------------

Comment (by azaozz):

 For consistency's sake we should add a check whether `$post` exists and
 return WP_Error, however that might break back-compat in plugins that
 expect either `false` or a string and don't follow core's example.

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


More information about the wp-trac mailing list