mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-11 18:56:10 +09:00
Merge branch 'release/2.0.26' of https://github.com/ultimatemember/ultimatemember into release/2.0.26
This commit is contained in:
@@ -346,7 +346,10 @@ function um_submit_form_errors_hook_( $args ) {
|
||||
continue 2;
|
||||
}
|
||||
} elseif ( $op == 'contains' ) {
|
||||
if ( strstr( $cond_value, $parent_value ) ) {
|
||||
if ( is_string( $cond_value ) && strstr( $cond_value, $parent_value ) ) {
|
||||
continue 2;
|
||||
}
|
||||
if( is_array( $cond_value ) && in_array( $parent_value, $cond_value ) ) {
|
||||
continue 2;
|
||||
}
|
||||
}
|
||||
@@ -376,7 +379,10 @@ function um_submit_form_errors_hook_( $args ) {
|
||||
continue 2;
|
||||
}
|
||||
} elseif ( $op == 'contains' ) {
|
||||
if ( ! strstr( $cond_value, $parent_value ) ) {
|
||||
if ( is_string( $cond_value ) && ! strstr( $cond_value, $parent_value ) ) {
|
||||
continue 2;
|
||||
}
|
||||
if( is_array( $cond_value ) && !in_array( $parent_value, $cond_value ) ) {
|
||||
continue 2;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -405,7 +405,10 @@ function um_get_custom_field_array( $array, $fields ) {
|
||||
$array['required'] = 0;
|
||||
}
|
||||
} elseif ( $op == 'contains' ) {
|
||||
if ( strstr( $cond_value, $parent_value ) ) {
|
||||
if ( is_string( $cond_value ) && strstr( $cond_value, $parent_value ) ) {
|
||||
$array['required'] = 0;
|
||||
}
|
||||
if( is_array( $cond_value ) && in_array( $parent_value, $cond_value ) ) {
|
||||
$array['required'] = 0;
|
||||
}
|
||||
}
|
||||
@@ -435,7 +438,10 @@ function um_get_custom_field_array( $array, $fields ) {
|
||||
$array['required'] = 0;
|
||||
}
|
||||
} elseif ( $op == 'contains' ) {
|
||||
if ( ! strstr( $cond_value, $parent_value ) ) {
|
||||
if( is_string( $cond_value ) && !strstr( $cond_value, $parent_value ) ) {
|
||||
$array['required'] = 0;
|
||||
}
|
||||
if( is_array( $cond_value ) && !in_array( $parent_value, $cond_value ) ) {
|
||||
$array['required'] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user