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>
This commit is contained in:
parent
5a32d5b059
commit
4c8586270a
1 changed files with 1 additions and 1 deletions
|
@ -683,7 +683,7 @@ sub GetBranchcodesWithOverdueRules {
|
|||
WHERE delay1 IS NOT NULL
|
||||
ORDER BY branchcode
|
||||
|);
|
||||
if ( $branchcodes->[0] eq '' ) {
|
||||
if ( defined $branchcodes->[0] && $branchcodes->[0] eq '' ) {
|
||||
# If a default rule exists, all branches should be returned
|
||||
return Koha::Libraries->search({}, { order_by => 'branchname' })->get_column('branchcode');
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue