Bug 26311: (follow-up) Fix undefined values in sprintf
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>
This commit is contained in:
parent
03b32e7a27
commit
50810e233d
|
|
@ -302,9 +302,9 @@ use C4::Biblio qw( GetMarcFromKohaField );
|
|||
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");
|
||||
|
|
|
|||
Loading…
Reference in New Issue