From 50810e233d09bd9272ed74fb5eb70a7e404ec999 Mon Sep 17 00:00:00 2001 From: Fridolin Somers Date: Mon, 27 Jun 2022 20:08:33 -1000 Subject: [PATCH] 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 Signed-off-by: Katrin Fischer Signed-off-by: Tomas Cohen Arazi --- misc/maintenance/search_for_data_inconsistencies.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/misc/maintenance/search_for_data_inconsistencies.pl b/misc/maintenance/search_for_data_inconsistencies.pl index f76b66fc9d..38bc5f643b 100755 --- a/misc/maintenance/search_for_data_inconsistencies.pl +++ b/misc/maintenance/search_for_data_inconsistencies.pl @@ -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"); -- 2.39.5