diff --git a/library/Admin/Private/UserGroupSelector.php b/library/Admin/Private/UserGroupSelector.php index 4eaef1c5b..9796598d0 100644 --- a/library/Admin/Private/UserGroupSelector.php +++ b/library/Admin/Private/UserGroupSelector.php @@ -100,14 +100,9 @@ public function addUserVisibilitySelect() { global $post; - if ( - empty($terms = $this->wpService->getTerms( - [ - 'taxonomy' => $this->userHelperConfig->getUserGroupTaxonomyName(), - 'hide_empty' => false - ] - )) - ) { + $terms = $this->wpService->getTerms([ 'taxonomy' => $this->userHelperConfig->getUserGroupTaxonomyName(), 'hide_empty' => false ]); + + if (empty($terms) || !is_array($terms)) { return; }