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

WordPress Trac noreply at wordpress.org
Tue Jan 22 05:19:29 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:  has-patch     |
--------------------------+------------------

Comment (by SergeyBiryukov):

 Replying to [comment:5 adamsilverstein]:
 > i'm trying to train myself to see the proper coding style by default

 Nitpicking: [attachment:get-post-format.diff] still misses some spaces. :)
 This would look better:
 {{{
         if ( empty( $post ) )
                 return new WP_Error( 'invalid_post', __( 'Invalid post' )
 );
 }}}

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


More information about the wp-trac mailing list