$conf, $runtime; function_exists('chdir') AND chdir(APP_PATH); $r = 'mysql' == $conf['cache']['type'] ? website_set('runtime', $runtime) : cache_set('runtime', $runtime); } function runtime_truncate() { global $conf; 'mysql' == $conf['cache']['type'] ? website_set('runtime', '') : cache_delete('runtime'); } register_shutdown_function('runtime_save'); ?>What's the warning on line 736?|Programmer puzzle solving
最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

What's the warning on line 736?

matteradmin8PV0评论

on my wp5.03 (though warnings were thrown Jan 7 and 19 so 5.02 or )

from public_html/error_log

PHP Warning: trim() expects parameter 1 to be string, array given in ... /wp-includes/class-wp-query.php on line 736

anyone else?

on my wp5.03 (though warnings were thrown Jan 7 and 19 so 5.02 or )

from public_html/error_log

PHP Warning: trim() expects parameter 1 to be string, array given in ... /wp-includes/class-wp-query.php on line 736

anyone else?

Share Improve this question asked Jan 28, 2019 at 16:34 Cody GCody G 11 silver badge1 bronze badge 2
  • Have you turned off all the plugins and switched to a default theme, to ensure that it is, in fact, WordPress (and not a plugin or a theme) that's throwing the error? – Pat J Commented Jan 28, 2019 at 16:38
  • Thanks Pat, that's the first thing I thought about, however, as the error isn't fatal, and as the error has only happened a few times in the past month, turning things off or changing themes on the production site isn't an option atm. I'll keep a watch on this post though. – Cody G Commented Jan 28, 2019 at 17:11
Add a comment  | 

1 Answer 1

Reset to default 0

As you can see here (https://core.trac.wordpress/browser/tags/5.0.3/src/wp-includes/class-wp-query.php#L736), the 736 line of that file contains:

$qv['name'] = trim( $qv['name'] );

And $qv is defined as:

$this->query_vars = $this->fill_query_vars($this->query_vars);
$qv = &$this->query_vars;

So... That means, that you use WP_Query incorrectly somewhere in your code...

You should pass string value as name param, and it looks like somewhere in your site an array is passed as that param...

Articles related to this article

Post a comment

comment list (0)

  1. No comments so far