From 6498982892b47c7671e46fc00707becd73172d84 Mon Sep 17 00:00:00 2001
From: Chris Cormack <chris@bigballofwax.co.nz>
Date: Fri, 27 Dec 2013 19:06:34 +1300
Subject: [PATCH] Bug 7965 : Silence warns in staff log

Silence warns in C4::Bookseller

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
---
 C4/Bookseller.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/C4/Bookseller.pm b/C4/Bookseller.pm
index 48f695c..f317719 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;
     }
-- 
1.8.5.2