[wp-trac] [WordPress Trac] #24258: PHP notices throws when the attachment parent not exists

WordPress Trac noreply at wordpress.org
Tue May 7 10:48:40 UTC 2013


#24258: PHP notices throws when the attachment parent not exists
--------------------------+------------------------
 Reporter:  alex-ye       |       Owner:
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:
Component:  Media         |     Version:  3.5.1
 Severity:  normal        |  Resolution:  duplicate
 Keywords:  has-patch     |
--------------------------+------------------------

Comment (by SergeyBiryukov):

 See the combined patch in #23154.

 `if ( empty( $post ) )` check from [attachment:24258.diff] probably makes
 sense, but it should return a string instead of null to be in line with
 the function's PHPDocs, and should be consistent with other `get_*_link()`
 functions, so it's better to address that in a separate ticket.

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


More information about the wp-trac mailing list