一旦我用以下错误消息将WordPress更新到5.3版:
[17-Nov-2019 01:15:14 UTC] PHP Warning: array_map(): Argument #2 should be an array in /home/name/public_html/web/wp-includes/class-wp-query.php on line 2069
[17-Nov-2019 01:15:14 UTC] PHP Warning: implode(): Invalid arguments passed in /home/name/public_html/web/wp-includes/class-wp-query.php on line 2069
[17-Nov-2019 01:15:14 UTC] WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near \') AND (
wpuw_term_relationships.term_taxonomy_id IN (9)
) AND (
wpuw_postm\' at line 1 for query SELECT SQL_CALC_FOUND_ROWS wpuw_posts.ID FROM wpuw_posts LEFT JOIN wpuw_term_relationships ON (wpuw_posts.ID = wpuw_term_relationships.object_id) INNER JOIN wpuw_postmeta ON ( wpuw_posts.ID = wpuw_postmeta.post_id ) WHERE 1=1 AND wpuw_posts.ID NOT IN () AND (
wpuw_term_relationships.term_taxonomy_id IN (9)
) AND (
wpuw_postmeta.meta_key = \'ecpt_toparticle\'
) AND wpuw_posts.post_type = \'post\' AND (wpuw_posts.post_status = \'publish\' OR wpuw_posts.post_status = \'private\') GROUP BY wpuw_posts.ID ORDER BY wpuw_posts.post_date DESC LIMIT 0, 5 made by require(\'wp-blog-header.php\'), require_once(\'wp-includes/template-loader.php\'), include(\'/themes/mydesign/category.php\'), WP_Query->__construct, WP_Query->query, WP_Query->get_posts
在中category.php
代码:<?php
$args = array(
\'meta_key\'=> \'ecpt_toparticle\',
\'showposts\' => 5,
\'category__in\' => $cat,
\'post__not_in\' => $tag
);
$sticky_query = new WP_Query( $args );
while ( $sticky_query->have_posts() ) : $sticky_query->the_post();
?>
它也不适用于Select标记:<option value="?tag=usa" <?php if ($tag == usa) echo \'selected="selected" \';?>>Usa</option>
到目前为止,我唯一的解决方案是恢复到WordPress版本5.2.4。