@@ -, +, @@ eval - Apply patch - Go to Home > Tools > Labels home > Manage label batches - Click "Add item(s)" - Verify that selection with date after and date before works the same as without patch. - Verify that you can not trigger a software error using invalid dates as 0000-00-00 or 32/01/1970 (copy/paste to date fields). --- labels/label-item-search.pl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) --- a/labels/label-item-search.pl +++ a/labels/label-item-search.pl @@ -78,8 +78,8 @@ if ( $op eq "do_search" ) { $dateto = $query->param('dateto'); if ($datefrom) { - if ( is_formatted_date_string( $datefrom ) ) { - $datefrom = output_pref({ dt => dt_from_string( $datefrom ), dateformat => 'iso', dateonly => 1 }); + $datefrom = eval { output_pref({ dt => dt_from_string( $datefrom ), dateformat => 'iso', dateonly => 1 }); }; + if ($datefrom ) { if ($QParser) { $ccl_query .= ' && ' if $ccl_textbox; $ccl_query .= @@ -93,8 +93,8 @@ if ( $op eq "do_search" ) { } if ($dateto) { - if ( is_formatted_date_string( $datefrom ) ) { - $dateto = output_pref({ dt => dt_from_string( $dateto ), dateformat => 'iso', dateonly => 1 }); + $dateto = eval { output_pref({ dt => dt_from_string( $dateto ), dateformat => 'iso', dateonly => 1 }); }; + if ($dateto ) { if ($QParser) { $ccl_query .= ' && ' if ( $ccl_textbox || $datefrom ); $ccl_query .= "acqdate(-" . $dateto . ')'; --