Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit be14c8a

Browse files
committedSep 3, 2012
Fix filter not applied when category has a ' in his name
Implemented by removing calls to db_prepare_* functions in filter_ensure_valid_filter(). Fixes #11605
1 parent c8ef2d7 commit be14c8a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed
 

‎core/filter_api.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -683,10 +683,10 @@ function filter_ensure_valid_filter( $p_filter_arr ) {
683683
$t_filter_value = META_FILTER_NONE;
684684
}
685685
if( 'string' == $t_multi_field_type ) {
686-
$t_checked_array[] = db_prepare_string( $t_filter_value );
686+
$t_checked_array[] = $t_filter_value;
687687
}
688688
else if( 'int' == $t_multi_field_type ) {
689-
$t_checked_array[] = db_prepare_int( $t_filter_value );
689+
$t_checked_array[] = (int)$t_filter_value;
690690
}
691691
else if( 'array' == $t_multi_field_type ) {
692692
$t_checked_array[] = $t_filter_value;
@@ -714,7 +714,7 @@ function filter_ensure_valid_filter( $p_filter_arr ) {
714714
if(( $t_filter_value === 'any' ) || ( $t_filter_value === '[any]' ) ) {
715715
$t_filter_value = META_FILTER_ANY;
716716
}
717-
$t_checked_array[] = db_prepare_string( $t_filter_value );
717+
$t_checked_array[] = $t_filter_value;
718718
}
719719
$p_filter_arr['custom_fields'][$t_cfid] = $t_checked_array;
720720
}

0 commit comments

Comments
 (0)
Please sign in to comment.