From b40109d8031a4451849dfaa1559b0934b8a6f6f7 Mon Sep 17 00:00:00 2001 From: Champ Camba Date: Thu, 4 May 2017 21:07:49 +0800 Subject: [PATCH] Fix custom field role validation --- core/um-form.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/um-form.php b/core/um-form.php index da1ffbd0..51227634 100644 --- a/core/um-form.php +++ b/core/um-form.php @@ -121,7 +121,7 @@ class UM_Form { $role = current( $_POST['role'] ); } - if ( isset( $custom_field_roles ) && is_array( $custom_field_roles ) && ! in_array( $role , $custom_field_roles ) ) { + if ( isset( $custom_field_roles ) && is_array( $custom_field_roles ) && ! empty( $role ) && ! in_array( $role , $custom_field_roles ) ) { wp_die( __( 'This is not possible for security reasons.','ultimatemember') ); }