diff --git a/src/Manager.php b/src/Manager.php index 45b3da6..07284f8 100644 --- a/src/Manager.php +++ b/src/Manager.php @@ -409,8 +409,8 @@ function dismissNotice(dismissElement) * * @return bool */ - public function is_users($args) - { + public function is_users($args): bool + { // If user ids is empty we want this shown on all users. if(!isset($args['user_ids'])) { @@ -420,7 +420,7 @@ public function is_users($args) /** * @var WP_User $current_user */ - $current_user = wp_get_current_user(); + $current_user = \wp_get_current_user(); // Per user if(!is_array($args['user_ids']) && $current_user->ID === $args['user_ids']) @@ -428,6 +428,11 @@ public function is_users($args) return true; } + if(!is_array($args['user_ids'])) + { + return false; + } + if(count($args['user_ids']) < 1) { return true;