Closed rubas closed 6 months ago
Yikes. I'm happy to put in a workaround, but I would strongly recommend using a different name for your taxonomy to avoid the problem altogether.
I've decided to close this off. There are really too many potential problems using a taxonomy with a name that matches an entity in WordPress, and no doubt other plugins that rightfully expect the parameter that's passed to this hook to be a string. I know it's frustrating, it's a shame that there are so many actions and filters in WordPress that have overly generic names.
Cheers!
Error
Fatal error: Uncaught Error: Object of class WP_Term could not be converted to string in /query-monitor/collectors/theme.php on line 119
Reproduce
sidebar
wp/wp-includes/taxonomy.php:1015
executes$_term = apply_filters( "get_{$taxonomy}", $_term, $taxonomy );
web/app/plugins/query-monitor/collectors/theme.php
catches the action( 'get_sidebar', array( $this, 'action_get_position' ));
action_get_position
will explode