Avoid warns 'Use of uninitialized value in sprintf' by using
'0' if lower age is undefined
'unlimited' if upper are is undefined
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
foreach my $invalid_patron (@invalid_patrons) {
my $category = $invalid_patron->category;
new_item(
- sprintf "Patron borrowernumber=%s has an invalid age of %s for their category '%s' (%s-%s)",
+ sprintf "Patron borrowernumber=%s has an invalid age of %s for their category '%s' (%s to %s)",
$invalid_patron->borrowernumber, $invalid_patron->get_age, $category->categorycode,
- $category->dateofbirthrequired, $category->upperagelimit
+ $category->dateofbirthrequired // '0', $category->upperagelimit // 'unlimited'
);
}
new_hint("You may change the patron's category automatically with misc/cronjobs/update_patrons_category.pl");