From b1a2e4bff17c6918980077dc040c51eae563caea 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 --- 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 f87f254..482be02 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.1.0