From febd0312f8623c9861bd70dd61aa3fd47afb1b51 Mon Sep 17 00:00:00 2001 From: Chris Cormack Date: Fri, 27 Dec 2013 19:06:34 +1300 Subject: [PATCH] Bug 7965: Silence warns in staff log 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 Tiny change, positive consequences. Passes QA script and all tests. Signed-off-by: Jonathan Druart Signed-off-by: Galen Charlton --- C4/Bookseller.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/Bookseller.pm b/C4/Bookseller.pm index 48f695c6ad..f317719d6f 100644 --- a/C4/Bookseller.pm +++ b/C4/Bookseller.pm @@ -131,7 +131,7 @@ sub GetBooksellersWithLateOrders { 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; } -- 2.39.5