Skip to content

Commit

Permalink
Fix warning on articles list on author page (#2204)
Browse files Browse the repository at this point in the history
Fix taxonomy check
  • Loading branch information
lithrel authored Jan 30, 2024
1 parent c3fa744 commit cb00d44
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/ListingPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,11 @@ private function add_listing_page_content(): void
*/
private function set_featured_action(): void
{
$taxonomy = $this->context['taxonomy'];
if ($taxonomy->taxonomy !== 'category' && ! is_tag()) {
$taxonomy = $this->context['taxonomy'] ?? null;
if (
!$taxonomy
|| ($taxonomy->taxonomy !== 'category' && ! is_tag())
) {
return;
}

Expand Down

0 comments on commit cb00d44

Please sign in to comment.