From 474a2295a645399caca87a3226c7e1bb639319e6 Mon Sep 17 00:00:00 2001 From: Mykyta Synelnikov Date: Wed, 12 Jul 2023 10:31:30 +0300 Subject: [PATCH] - fixed PHP notice; --- includes/admin/core/class-admin-notices.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/includes/admin/core/class-admin-notices.php b/includes/admin/core/class-admin-notices.php index d3b81e8e..5417a00d 100644 --- a/includes/admin/core/class-admin-notices.php +++ b/includes/admin/core/class-admin-notices.php @@ -809,8 +809,10 @@ if ( ! class_exists( 'um\admin\core\Admin_Notices' ) ) { } private function check_new_user_role() { - $content = ''; $arr_banned_caps = UM()->options()->get( 'banned_capabilities' ); + if ( empty( $arr_banned_caps ) ) { + return; + } $global_role = get_option( 'default_role' ); // WP Global settings $caps = get_role( $global_role )->capabilities;