Silence warns in C4::Bookseller::GetBooksellersWithLateOrders()
to test
1/ run prove t/db_dependent/Bookseller.t
Notice lots of Use of uninitialized value $delay in numeric lt (<) at /var/lib/jenkins/jobs/Koha_master/workspace/C4/Bookseller.pm line 134 type lines
2/ apply patch
3/ run prove t/db_dependent/Bookseller.t
Notice warns are gone
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Tiny change, positive consequences.
Passes QA script and all tests.
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
if ( defined $delay && $delay >= 0 ) {
$query .= " AND (closedate <= DATE_SUB(CAST(now() AS date),INTERVAL ? + COALESCE(aqbooksellers.deliverytime,0) DAY)) ";
push @query_params, $delay;
- } elsif ( $delay < 0 ){
+ } elsif ( $delay && $delay < 0 ){
warn 'WARNING: GetBooksellerWithLateOrders is called with a negative value';
return;
}