[wp-trac] [WordPress Trac] #13437: Segfault in function admin_url when not using casting (string)

WordPress Trac wp-trac at lists.automattic.com
Tue May 18 22:30:41 UTC 2010


#13437: Segfault in function admin_url when not using casting (string)
--------------------------+-------------------------------------------------
 Reporter:  dz0ny         |        Owner:          
     Type:  defect (bug)  |       Status:  reopened
 Priority:  normal        |    Milestone:          
Component:  Multisite     |      Version:  3.0     
 Severity:  normal        |   Resolution:          
 Keywords:  has-patch     |  
--------------------------+-------------------------------------------------
Changes (by hakre):

  * keywords:  => has-patch
  * status:  closed => reopened
  * resolution:  worksforme =>


Comment:

 Replying to [comment:2 nacin]:
 > get_admin_url() should never return anything but a string that I know
 of.

 That's incorrect:
 {{{
 return apply_filters('admin_url', $url, $path, $blog_id);
 }}}
 The {{{apply_filters()}}} function does not have any specified return
 type. Since filters per se aren't properly documented, I think it's pretty
 valid to add a cast here in {{{admin_url()}}} so that at least
 {{{admin_url()}}} matches it's own specs.

 That is obviously something usefull in PHP because PHP is not that strong
 typed. I'll add a patch and re-open.

 My Milesonte suggestion is none but a simple and quick fix for such a easy
 to solve issue is preferable the commit right away.

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


More information about the wp-trac mailing list