Permalink
Browse files

Fix data type mismatch when filtering by date

This was caused by inconsistent initialization of filter, which was set
to 'on' when checkbox was checked, and FALSE when unchecked. We now set
it to 'off' when unchecked.

Use of ternary operator to simplify code.

Fixes #16516
  • Loading branch information...
1 parent 158f729 commit 1a417b123b1dbea702c3b55ff4e83bc8b8fb5545 @dregad dregad committed Oct 22, 2013
Showing with 2 additions and 9 deletions.
  1. +2 −9 view_all_set.php
View
11 view_all_set.php
@@ -360,15 +360,8 @@
$f_type = 1;
}
-if ( $f_do_filter_by_date ) {
- $f_do_filter_by_date = 'on';
-}
-
-if ( $f_sticky_issues ) {
- $f_sticky_issues = 'on';
-} else {
- $f_sticky_issues = 'off';
-}
+$f_do_filter_by_date = $f_do_filter_by_date ? 'on' : 'off';
+$f_sticky_issues = $f_sticky_issues ? 'on' : 'off';
if ( $f_type < 0 ) {
print_header_redirect( 'view_all_bug_page.php' );

0 comments on commit 1a417b1

Please sign in to comment.