From 319a621a954c37dc44c769232c9765315260cef3 Mon Sep 17 00:00:00 2001 From: vnmedeiros Date: Thu, 1 Jul 2021 14:17:32 -0300 Subject: [PATCH] fix: permissions check taxonomy index undefined --- .../api/endpoints/class-tainacan-rest-items-controller.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/classes/api/endpoints/class-tainacan-rest-items-controller.php b/src/classes/api/endpoints/class-tainacan-rest-items-controller.php index 576586bb3..5b7c7ba9c 100644 --- a/src/classes/api/endpoints/class-tainacan-rest-items-controller.php +++ b/src/classes/api/endpoints/class-tainacan-rest-items-controller.php @@ -569,6 +569,8 @@ class REST_Items_Controller extends REST_Controller { private function get_items_permissions_check_for_taxonomy($taxonomies) { foreach ($taxonomies as $tax) { + if( !isset($tax['taxonomy']) ) + return false; $taxonomy = \tainacan_taxonomies()->fetch_by_db_identifier( $tax['taxonomy'] ); if( $taxonomy instanceof Entities\Taxonomy ) {