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

From the php manual the array_key_exists() function takes as first argument “any value possible for an array index.”, again looking up for arrays in the docs we can get that “The key can either be an integer or a string. The value can be of any type.”, which also corresponds to the error you see from the Query Monitor.

Meaning that the $taxonomy variable that is passing to the array_key_exists() is not either a string or integer.

You can debug the $taxonomy variable, by making a var_dump($taxonomy);.

Hope, that helps.