Skip to content

Commit deb84af

Browse files
committed
fix: ensure term has taxonomy
1 parent 5346265 commit deb84af

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

includes/theme-helpers.php

+4
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,10 @@ function get_sponsors_for_archive( $term_id = null, $scope = null, $logo_options
237237
return false;
238238
}
239239

240+
if ( ! property_exists( $term, 'taxonomy' ) ) {
241+
return false;
242+
}
243+
240244
$sponsors = [];
241245
$type = 'category' === $term->taxonomy ? 'category' : 'tag';
242246
$term_sponsors = get_sponsor_posts_for_terms( [ $term ] );

0 commit comments

Comments
 (0)