Bug 36128: Use of uninitialized value in string eq at /usr/share/koha/lib/C4/Overdues.pm
authorDenys Konovalov <kontakt@denyskon.de>
Sun, 23 Jun 2024 12:13:35 +0000 (14:13 +0200)
committerKatrin Fischer <katrin.fischer@bsz-bw.de>
Thu, 27 Jun 2024 12:04:46 +0000 (14:04 +0200)
commit4c8586270af07d4281215d060cef004e33999972
treeb095376307e8e554fafcb46c653cf544db3a4eb3
parent5a32d5b059d2eac6679b43cf9a3e40d96df56a7f
Bug 36128: Use of uninitialized value in string eq at /usr/share/koha/lib/C4/Overdues.pm

Fixes the following error message when running the overdues check cronjob on a
Koha system without defined overdue rules:

/etc/cron.daily/koha-common:
Use of uninitialized value in string eq at /usr/share/koha/lib/C4/Overdues.pm
line 686.

by checking if the variable is defined before comparing it.

Test plan:
1. Go to Tools - Overdue notice/status triggers and verify that for every single
   patron type for both Default and every individual library, you have no value
   set for Delay, so that you will never send anyone an overdue notice
2. Run the cron job which creates and sends overdue notices
3. Confirm the above mentioned error no longer appears

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
C4/Overdues.pm