From 270e6c8e66b60b6c1a813285730ecf930469d3b8 Mon Sep 17 00:00:00 2001 From: champsupertramp Date: Sun, 11 Sep 2016 12:40:52 +0800 Subject: [PATCH] Fix role validation on registration process --- 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 ccd6c9f9..e7eae33f 100644 --- a/core/um-form.php +++ b/core/um-form.php @@ -124,7 +124,7 @@ class UM_Form { $role = current( $_POST['role'] ); } - if ( isset( $custom_field_roles ) && ! in_array( $role , $custom_field_roles ) ) { + if ( isset( $custom_field_roles ) && is_array( $custom_field_roles ) && ! in_array( $role , $custom_field_roles ) ) { wp_die( __( 'This is not possible for security reasons.','ultimatemember') ); }