Merge remote-tracking branch 'remotes/origin/fix/helpscout#32072_stripslashes_warning'

This commit is contained in:
nikitasinelnikov
2019-07-16 14:12:27 +03:00
+4 -1
View File
@@ -247,7 +247,10 @@ function um_user_edit_profile( $args ) {
}
//validation of correct values from options in wp-admin
$stripslashes = stripslashes( $args['submitted'][ $key ] );
$stripslashes = $args['submitted'][ $key ];
if( is_string( $stripslashes ) ){
$stripslashes = stripslashes( $stripslashes );
}
if ( in_array( $array['type'], array( 'select' ) ) &&
! empty( $array['options'] ) && ! empty( $stripslashes ) &&
! in_array( $stripslashes, array_map( 'trim', $array['options'] ) ) ) {