• 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)
  • 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

    (@inlinerbutch)

    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

    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.