Bug 14534: Stop overdue_notices.pl from issuing the warning: Use of uninitialized...
authorUlrich Kleiber <ulrich.kleiber@bsz-bw.de>
Wed, 15 Jul 2015 06:35:13 +0000 (08:35 +0200)
committerTomas Cohen Arazi <tomascohen@unc.edu.ar>
Fri, 7 Aug 2015 18:20:03 +0000 (15:20 -0300)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
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 <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
misc/cronjobs/overdue_notices.pl

index f87f254..482be02 100755 (executable)
@@ -556,7 +556,7 @@ END_SQL
                         next;
                     }
                 }
                         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;
 # we have already dealt with this borrower
                     $verbose and warn "already dealt with this borrower $borrowernumber";
                     next;