Title: xmlrpc.php PHP error
Last modified: August 18, 2016

---

# xmlrpc.php PHP error

 *  [da_buddha](https://wordpress.org/support/users/da_buddha/)
 * (@da_buddha)
 * [19 years, 6 months ago](https://wordpress.org/support/topic/xmlrpcphp-php-error/)
 * Although it isn’t visible anywhere on my site, my server keeps a log file of 
   all PHP errors. It’s been listing one about 10-20 times/day for a long time as
   follows:
 * PHP Warning: Invalid argument supplied for foreach() in /home/firstsho/public_html/
   xmlrpc.php on line 160
 * Line 160’s functon (the line with > is actually 160):
    ` 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); } }}
 * I have no clue why it would be coming up with this, but just trying to narrow
   down any errors/warnings so the whole blog works better on a whole. Thanks!

The topic ‘xmlrpc.php PHP error’ is closed to new replies.

## Tags

 * [foreach](https://wordpress.org/support/topic-tag/foreach/)
 * [WPadvanced](https://wordpress.org/support/topic-tag/wpadvanced/)
 * [xmlrpc](https://wordpress.org/support/topic-tag/xmlrpc/)

 * In: [Everything else WordPress](https://wordpress.org/support/forum/miscellaneous/)
 * 0 replies
 * 1 participant
 * Last reply from: [da_buddha](https://wordpress.org/support/users/da_buddha/)
 * Last activity: [19 years, 6 months ago](https://wordpress.org/support/topic/xmlrpcphp-php-error/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
