[wp-trac] [WordPress Trac] #3000: warning returned in xmlrpc.php on pingback

WordPress Trac wp-trac at lists.automattic.com
Sat Aug 5 14:11:01 GMT 2006


#3000: warning returned in xmlrpc.php on pingback
----------------------------+-----------------------------------------------
 Reporter:  _ck_            |       Owner:  anonymous
     Type:  defect          |      Status:  new      
 Priority:  normal          |   Milestone:  2.1      
Component:  Administration  |     Version:  2.0      
 Severity:  normal          |    Keywords:           
----------------------------+-----------------------------------------------
 I am getting the following warning while doing a pingback to a test blog
 using 2.1a2 (however I don't believe the code in question has changed
 since 2.0 gold).

 1. Yes it appears twice in a row.
 2. I am using the pingback class from pear so I am assuming it's sending
 properly formed data.

 {{{
 <b>Warning</b>:  Invalid argument supplied for foreach()
 in <b>/home/example/public_html/news/xmlrpc.php</b> on line <b>160</b><br
 />
 <br />
 <b>Warning</b>:  Invalid argument supplied for foreach()
 in <b>/home/example/public_html/news/xmlrpc.php<
 }}}

 The code in question is here:

 {{{
         function escape(&$array) {
                 global $wpdb;

                 foreach ($array as $k => $v) {
                         if (is_array($v)) {
                                 $this->escape($array[$k]);
                         } else if (is_object($v)) {
                                 //skip
                         } else {
                                 $array[$k] = $wpdb->escape($v);
                         }
                 }
         }
 }}}

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


More information about the wp-trac mailing list