We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5d1a57f commit b002167Copy full SHA for b002167
core/filter_api.php
@@ -606,8 +606,20 @@ function filter_ensure_valid_filter( $p_filter_arr ) {
606
unset( $t_fields[$i] );
607
}
608
609
+
610
+ # Make sure array is no longer than 2 elements
611
$t_sort_fields = explode( ',', $p_filter_arr['sort'] );
612
+ if( count( $t_sort_fields ) > 2 ) {
613
+ $t_sort_fields = array_slice( $t_sort_fields, 0, 2 );
614
+ }
615
616
617
$t_dir_fields = explode( ',', $p_filter_arr['dir'] );
618
+ if( count( $t_dir_fields ) > 2 ) {
619
+ $t_dir_fields = array_slice( $t_dir_fields, 0, 2 );
620
621
622
+ # Validate the max of two segments for $t_sort_fields and $t_dir_fields
623
for( $i = 0;$i < 2;$i++ ) {
624
if( isset( $t_sort_fields[$i] ) ) {
625
$t_drop = false;
0 commit comments