Skip to content

Commit

Permalink
Merge pull request #93 from ItinerisLtd/ERROR-FIX/uncaught-type-error
Browse files Browse the repository at this point in the history
empty array if taxonomy query var is null
  • Loading branch information
jjgrainger authored Oct 13, 2024
2 parents e9bb49d + 7c64360 commit 865ddb1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Taxonomy.php
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ public function setSortableColumns($columns)
public function sortSortableColumns($query)
{
// don't modify the query if we're not in the post type admin
if (!is_admin() || !in_array($this->name, $query->query_vars['taxonomy'])) {
if (!is_admin() || !in_array($this->name, $query->query_vars['taxonomy'] ?? [])) {
return;
}

Expand Down

0 comments on commit 865ddb1

Please sign in to comment.