The problem is that in $GLOBALS['my_query_filters']
you need to pass it the key
and then the name
, but you are passing the name in twice. Because of this it isn’t able to call get_field_object()
correctly, thus can’t determine the field type
, thus the error.