[wp-trac] [WordPress Trac] #10778: PHP Warning in class-IXR.php when $method is array

WordPress Trac wp-trac at lists.automattic.com
Sun Sep 13 07:52:32 UTC 2009


#10778: PHP Warning in class-IXR.php when $method is array
--------------------------+-------------------------------------------------
 Reporter:  orensol       |       Owner:                            
     Type:  defect (bug)  |      Status:  new                       
 Priority:  normal        |   Milestone:  Unassigned                
Component:  General       |     Version:                            
 Severity:  normal        |    Keywords:  xmlrpc, class-IXR, warning
--------------------------+-------------------------------------------------
 On line 352 in class-IXR.php, there's a call to substr() with $method as
 the first parameter, which issues the following PHP warning if $method is
 an array:

 PHP Warning:  substr() expects parameter 1 to be string, array given

 Only later on line 363 there's a call to is_array() on $method.

 Suggested fix:
 condition the call to substr if !is_array($method).

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/10778>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list