- fixed small notices about array_intersect;

This commit is contained in:
nikitozzzzzzz
2018-02-19 12:10:54 +02:00
parent f4d1251220
commit 1b03923c6b
7 changed files with 12 additions and 9 deletions
+1 -1
View File
@@ -1172,7 +1172,7 @@ if ( ! class_exists( 'Fields' ) ) {
um_fetch_user( $_um_profile_id );
if ( isset( $data['public'] ) && $data['public'] == '-2' && $data['roles'] ) {
$current_user_roles = um_user( 'roles' );
if ( count( array_intersect( $current_user_roles, $data['roles'] ) ) > 0 ) {
if ( ! empty( $current_user_roles ) && count( array_intersect( $current_user_roles, $data['roles'] ) ) > 0 ) {
$disabled = '';
}
}