From 01d8f4f67eae417f16ed53c2351ac8e7cbd3a7f1 Mon Sep 17 00:00:00 2001 From: champsupertramp Date: Sun, 6 Mar 2016 11:54:08 +0800 Subject: [PATCH] Remove notices --- core/um-actions-form.php | 2 +- core/um-fields.php | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/core/um-actions-form.php b/core/um-actions-form.php index 253ab682..429a3934 100644 --- a/core/um-actions-form.php +++ b/core/um-actions-form.php @@ -95,7 +95,7 @@ if( isset( $fields ) ){ foreach( $fields as $key => $array ) { if ( isset($array['validate']) && in_array( $array['validate'], array('unique_username','unique_email','unique_username_or_email') ) ) { - if ( !$ultimatemember->form->has_error( $key ) && in_array( $args[$key], $words ) ) { + if ( !$ultimatemember->form->has_error( $key ) && isset( $args[$key] ) && in_array( $args[$key], $words ) ) { $ultimatemember->form->add_error( $key, __('You are not allowed to use this word as your username.','ultimatemember') ); } } diff --git a/core/um-fields.php b/core/um-fields.php index cd712bad..cf8279dc 100644 --- a/core/um-fields.php +++ b/core/um-fields.php @@ -2426,8 +2426,12 @@ class UM_Fields { if ( $borderradius ) $css_heading_borderradius = 'border-radius: ' . $borderradius . ' ' . $borderradius . ' 0px 0px;'; $output .= '
'; - if ( isset($icon) ) $output .= ''; - $output .= $heading_text .'
'; + + if ( isset( $icon ) ) { + $output .= ''; + } + + $output .= ( ! empty( $heading_text ) ? $heading_text: '') .''; } else {