tribe_get_event_cat_slugs error with empty categories
-
Hi, there is an error appearing when you use the functions tribe_get_event_cat_slugs or tribe_get_event_cat_ids and there is no category assigned to an event.
In wp-content/plugins/the-events-calendar/src/functions/template-tags/general.php – line 473 you check if an error is occuring:
if ( $terms instanceof WP_Error ) { return []; }
But you also need to check if the request is empty:
if ( empty($terms) || $terms instanceof WP_Error ) { return []; }
The same goes for the line 496 in the function tribe_get_event_cat_slugs.
All the best
Christian
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘tribe_get_event_cat_slugs error with empty categories’ is closed to new replies.