Remove notice

This commit is contained in:
Champ Camba
2019-06-19 16:53:33 +08:00
parent 19878b885c
commit 5656dad18d
+5 -1
View File
@@ -73,7 +73,11 @@ if ( ! class_exists( 'um\core\Validation' ) ) {
}
//validation of correct values from options in wp-admin
$stripslashes = stripslashes( $value );
$stripslashes = $value;
if( is_string( $value ) ){
$stripslashes = stripslashes( $value );
}
if ( in_array( $fields[ $key ]['type'], array( 'select' ) ) &&
! empty( $stripslashes ) && ! empty( $fields[ $key ]['options'] ) &&
! in_array( $stripslashes, array_map( 'trim', $fields[ $key ]['options'] ) ) ) {