[wp-trac] [WordPress Trac] #15771: url_to_postid() issues a notice on unmatching url's

WordPress Trac wp-trac at lists.automattic.com
Sat Dec 11 09:19:36 UTC 2010


#15771: url_to_postid() issues a notice on unmatching url's
--------------------------+-------------------------------------------------
 Reporter:  dd32          |        Owner:        
     Type:  defect (bug)  |       Status:  closed
 Priority:  normal        |    Milestone:  3.1   
Component:  General       |      Version:  3.1   
 Severity:  normal        |   Resolution:  fixed 
 Keywords:                |  
--------------------------+-------------------------------------------------

Comment(by nacin):

 Right, I'm saying the source there is redundant. is_single XOR is_page
 will always be true when is_attachment is true. The last part is dead
 code. (That said, I wouldn't remove it, because it explains what
 is_singular is supposed to match.)

 Again, I may have missed something, but I went through every is_attachment
 flag in WP_Query and found every one of them to also be paired with
 is_single or is_page.

 I think this ticket is fine as is, also.

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


More information about the wp-trac mailing list