Error: array_map(): Argument #2

(Revised answer, based on the code in question and this)

After the discussion, I realized that:

  1. You should replace the post__not_in with tag; i.e. use 'tag' => $tag.

    You should also understand that post__not_in should be an array of post IDs and not tag/category slugs, names, etc. And if you don’t pass an array, then you’d get the error in question, even in WordPress version 5.2.4. 🙂

  2. You should use get_query_var( 'tag' ) to get the selected tag (slug).

  3. And remove the category__in.

So your WP_Query code would look like so:

$args = array(                 // then the query args
    'posts_per_page' => 5, // you should use posts_per_page and not showposts
    'post_type'      => 'post',
    'tag'            => get_query_var( 'tag' )
);

$sticky_query = new WP_Query( $args );

Additionally:

  1. The select code (for letting users pick a tag):

    <?php $tag = get_query_var( 'tag' ); ?>
    <select name="formal" class="city-choice" onchange="handleSelect(this)"
        data-action="<?php echo esc_url( add_query_arg( 'tag', '%tag%' ) ); ?>">
        <option value="">Select a tag</option>
        <option value="usa" <?php selected( $tag, 'usa' ); ?>>Usa</option>
        <option value="italy" <?php selected( $tag, 'italy' ); ?>>Italy</option>
    </select>
    
  2. The JavaScript code (for submitting the tag selected via the above select):

    <script type="text/javascript">
    function handleSelect(elm) {
        window.location = elm.dataset.action.replace( '%tag%', elm.value );
    }
    </script>
    

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)