Skip to content

Commit

Permalink
fix: WP_Error passed where array is required (#1244)
Browse files Browse the repository at this point in the history
  • Loading branch information
thorbrink authored Jan 14, 2025
1 parent 9c56133 commit d6886a9
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions library/Admin/Private/UserGroupSelector.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit d6886a9

Please sign in to comment.