[wp-trac] [WordPress Trac] #48678: Problem with $tag V5.3

WordPress Trac noreply at wordpress.org
Sun Nov 17 09:50:46 UTC 2019


#48678: Problem with $tag V5.3
--------------------------+-----------------------------
 Reporter:  pajtim        |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:  5.3
 Severity:  critical      |   Keywords:  $tag
  Focuses:                |
--------------------------+-----------------------------
 Hi me and many others have a problem with the latest wordpress update.
 This is about $tag.
 $tag does not work and gives me this message:


 {{{
 [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

 }}}

 In this situation the select does not work in TAG:

 {{{
 <option value="?tag=usa" <?php if ($tag == usa) echo 'selected="selected"
 ';?>>Usa</option>
 }}}

 var_dump($cat); return Nothing and var_dump($tag); return Category.

 In category.php code:


 {{{
 <?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();
 ?>
 }}}


 In this case I have returned wordpress 5.2.4
 Thanks,
 Pajtim

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/48678>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list