From 7c64360ed35e511099b8204332c5b713d60591e9 Mon Sep 17 00:00:00 2001 From: Barny-Thorpe <47748897+Barny-Thorpe@users.noreply.github.com> Date: Fri, 31 Mar 2023 11:22:33 +0100 Subject: [PATCH] empty array if null --- src/Taxonomy.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Taxonomy.php b/src/Taxonomy.php index 483340c..a820304 100644 --- a/src/Taxonomy.php +++ b/src/Taxonomy.php @@ -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; }