I’m getting the following errors when I have this plugin installed and go to wordpress/wp-admin/edit.php :
Notice: Undefined index: country in /Volumes/Users/me/Sites/MAMP/local_test/wordpress/wp-content/plugins/tc-custom-taxonomy-filter/tc-custom-taxonomy-filter.php on line 27
Notice: Trying to get property of non-object in /Volumes/me/me/Sites/MAMP/local_test/wordpress/wp-content/plugins/tc-custom-taxonomy-filter/tc-custom-taxonomy-filter.php on line 37
Adding the following before and after line 27 sorts this:
if (!isset($wp_query->query_vars[$tax_slug])) $wp_query->query_vars[$tax_slug] = “”;
$term = get_term_by( ‘slug’, $wp_query->query_vars[$tax_slug], $taxonomy->name );
if (!isset($term->term_id)) $term->term_id = 0;
solves this for me.
- The topic ‘Debug errors – lines 27 & 37’ is closed to new replies.