From d14d01d7604a349377c3a02cbc5879e597b06895 Mon Sep 17 00:00:00 2001 From: Ulrich Kleiber Date: Wed, 15 Jul 2015 08:35:13 +0200 Subject: [PATCH] Bug 14534: Stop overdue_notices.pl from issuing the warning: Use of uninitialized value $borrowernumber Signed-off-by: Chris Cormack To test: 1/ Run the overdue_notices.pl script (don't do this on production obviously :)) 2/ Notice the warns 3/ Apply patch 4/ Run again 5/ Notice no warns, but notices are still generated ok Signed-off-by: Jonathan Druart Signed-off-by: Tomas Cohen Arazi (cherry picked from commit d873ed3b5d97f825c52dc53c2f72bd5a1ef03647) Signed-off-by: Chris Cormack --- misc/cronjobs/overdue_notices.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/cronjobs/overdue_notices.pl b/misc/cronjobs/overdue_notices.pl index 7068d3dfc4..908f3fc831 100755 --- a/misc/cronjobs/overdue_notices.pl +++ b/misc/cronjobs/overdue_notices.pl @@ -556,7 +556,7 @@ END_SQL next; } } - if ($borrowernumber eq $data->{'borrowernumber'}){ + if (defined $borrowernumber && $borrowernumber eq $data->{'borrowernumber'}){ # we have already dealt with this borrower $verbose and warn "already dealt with this borrower $borrowernumber"; next; -- 2.39.5