[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 21:19:11 UTC 2010


#13437: Segfault in function admin_url when not using casting (string)
--------------------------+-------------------------------------------------
 Reporter:  dz0ny         |        Owner:            
     Type:  defect (bug)  |       Status:  closed    
 Priority:  normal        |    Milestone:  3.0       
Component:  Multisite     |      Version:  3.0       
 Severity:  major         |   Resolution:  worksforme
 Keywords:                |  
--------------------------+-------------------------------------------------

Old description:

> Hello,
>
> there is unresolved bug with php 5.2.x(see
> http://bugs.php.net/bug.php?id=47522), which causes segfault in all
> distributions and with multiple frameworks(Zend, qubit-toolkit...), the
> solution so far is to cast return value as string.
>
> Solution is:
> in wp-includes/link-template.php
> {{{
> function admin_url( $path = '', $scheme = 'admin' ) {
>         return (string)get_admin_url(null, $path, $scheme);
> }
> }}}
> Server info:
> http://www.prirocnikporoka.si/phpinfo.php

New description:

 Hello,

 there is unresolved bug with php 5.2.x(see
 http://bugs.php.net/bug.php?id=47522), which causes segfault in all
 distributions and with multiple frameworks(Zend, qubit-toolkit...), the
 solution so far is to cast return value as string.

 Solution is:
 in wp-includes/link-template.php
 {{{
 function admin_url( $path = '', $scheme = 'admin' ) {
         return (string)get_admin_url(null, $path, $scheme);
 }
 }}}

--

Comment(by nacin):

 get_admin_url() should never return anything but a string that I know of.
 If it did, no WordPress objects have a __toString() method and thus this
 bug does not apply.

 I have edited out your phpinfo.php link. I would delete that file
 immediately.

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


More information about the wp-trac mailing list