Title: Warning for query.php?
Last modified: August 22, 2016

---

# Warning for query.php?

 *  [inlinerbutch](https://wordpress.org/support/users/inlinerbutch/)
 * (@inlinerbutch)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/warning-for-queryphp/)
 * Hello,
 * I checked my error log for other purposes but found also a lot off warnings from/
   wp-includes/query.php.
 *     ```
       PHP Warning:  Invalid argument supplied for foreach() in /www/htdocs/xxxxxxx/hhwp/wp-includes/query.php on line 1863
       PHP Warning:  strpos() expects parameter 1 to be string, array given in /www/htdocs/xxxxxxx/hhwp/wp-includes/query.php on line 1861
       PHP Warning:  preg_split() expects parameter 2 to be string, array given in /www/htdocs/xxxxxxx/hhwp/wp-includes/query.php on line 1862
       ```
   
 * I know that query.php sometimes make trouble but I didn’t find a workarround 
   for this.
 * Does anyone have an idea or information how to solve?
 * Best Regards,
    Uwe

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [Shawn Hooper](https://wordpress.org/support/users/shooper/)
 * (@shooper)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/warning-for-queryphp/#post-5936228)
 * Hi inlinerbutch,
 * Not really an answer to your question, but more some things to try to narrow 
   down the problem:
 * Looking at that part of the core code, the warnings are being thrown in relation
   to doing a taxonomy query. Out of curiosity, have you been able to associate 
   these errors with loading a specific page/post on your site? (Maybe looking at
   the access log for the same timestamp as the PHP warning in the error log)
 * If you’re able to trigger this error, then my next suggestion would to be turn
   off any plugins on the site, and see if the warning still occurs. It’s likely
   that there’s a plugin making use of the WP_Query class that’s causing this. If
   the error persists without any plugins running, then I’d say it’s a bug in core,
   and would raise it in Trac (the issue tracker for Core).
 * Also, what version of PHP is running on the server?
 *  Thread Starter [inlinerbutch](https://wordpress.org/support/users/inlinerbutch/)
 * (@inlinerbutch)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/warning-for-queryphp/#post-5936249)
 * Hi Shawn,
 * I agree to your approach. I can exclude an external call of query.php because
   I blocked it in htaccess to find the root cause.
    Since I don’t believe that 
   it is an core problem I will try to locate it by disabling the plugins and find
   the trigger. I will keep you informed. By the way we are using PHP 5.5 .
 * Regards,
    Uwe
 *  [Shawn Hooper](https://wordpress.org/support/users/shooper/)
 * (@shooper)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/warning-for-queryphp/#post-5936253)
 * Uwe,
 * Great. If the plugins don’t fix it, I would also suggest switching your theme
   to one of the default themes (TwentyFifteen for example) to see if that clears
   it up. Process of elimination.
 * Cheers.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Warning for query.php?’ is closed to new replies.

## Tags

 * [php-error](https://wordpress.org/support/topic-tag/php-error/)
 * [query.php](https://wordpress.org/support/topic-tag/query-php/)
 * [warning](https://wordpress.org/support/topic-tag/warning/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 2 participants
 * Last reply from: [Shawn Hooper](https://wordpress.org/support/users/shooper/)
 * Last activity: [11 years, 2 months ago](https://wordpress.org/support/topic/warning-for-queryphp/#post-5936253)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
