Bug 20537: Added checks to remove warning from overdue_notices.pl
authorHayley Mapley <hayleymapley@catalyst.net.nz>
Fri, 24 May 2019 18:52:58 +0000 (13:52 -0500)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Thu, 30 May 2019 20:38:19 +0000 (21:38 +0100)
commit6a219c80805c6bff21960673781d0fa670fd331a
tree2e1fb3c1399a9ff467a7aed1d65abe715a0ef8bd
parent0bc11fc432eb4902259283786ad93dfca4db5c32
Bug 20537: Added checks to remove warning from overdue_notices.pl

When executing overdue_notices.pl on borrowers that lack a surname, we
see this error:
Use of uninitialized value in concatenation (.) or string at
/usr/share/koha/bin/cronjobs/overdue_notices.pl line 575.

This patch fixes this issue by setting the $borr variable
based on the information that has been defined.

To test:
1) Create a borrower and set its surname to null
2) Checkout an item to the borrower and set it to be overdue
3) Navigate to kohaclone/misc/cronjobs and enter a koha-shell
4) Run the script: ./overdue_notices.pl
5) Observe the error appears
6) Apply the patch
7) Repeat steps 3-4
8) Observe the error is gone
9) Sign off!

Sponsored-by: Catalyst IT

Signed-off-by: Liz Rea <wizzyrea@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 7d42e29c8b8cd913b052d10525c4d0b2cb36fc0d)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
misc/cronjobs/overdue_notices.pl