Plugin error “array_key_exists(): The first argument should be either a string or an integer” [closed]

Question

Checking the Query Monitor, it’s throwing out this error,

array_key_exists(): The first argument should be either a string or an integer

which relates to this function:

public function lsx_team_scporder_get_terms_orderby( $orderby, $args ) {
    if ( is_admin() )
        return $orderby;

    $tags = $this->get_lsx_team_scporder_options_tags();

    if ( ! isset( $args['taxonomy'] ) )
        return $orderby;

    $taxonomy = $args['taxonomy'];
    if ( is_array( $taxonomy ) && count( $taxonomy ) == 1 )
        $taxonomy = $taxonomy[0];
    if ( ! array_key_exists($taxonomy, $tags ) )
        return $orderby;

    $orderby = 't.lsx_team_term_order';
    return $orderby;
}

Why is it throwing out that error?

--------------------------------------------------

>>> Share a link to this question, just copy and paste the code bellow on your web page <<<

<a href="https://www.wptricks.com/question/plugin-error-array_key_exists-the-first-argument-should-be-either-a-string-or-an-integer-closed/">

Plugin error "array_key_exists(): The first argument should be either a string or an integer" [closed]</a>
0
, , Demonix 2 months 0 Answers 77 views 0

Leave an answer