From 6f574f6747b03bdf4d48a0a134da38b4a0442fe7 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Fri, 25 Mar 2022 09:05:18 +0100 Subject: [PATCH] Bug 30222: Remove warning Use of uninitialized value in string ne at misc/cronjobs/automatic_renewals.pl line 193. Signed-off-by: Jonathan Druart Signed-off-by: Fridolin Somers Signed-off-by: Kyle M Hall --- misc/cronjobs/automatic_renewals.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/misc/cronjobs/automatic_renewals.pl b/misc/cronjobs/automatic_renewals.pl index ecd3c24f50..a80c166ee0 100755 --- a/misc/cronjobs/automatic_renewals.pl +++ b/misc/cronjobs/automatic_renewals.pl @@ -190,8 +190,8 @@ while ( my $auto_renew = $auto_renews->next ) { say sprintf "Issue id: %s for borrower: %s and item: %s %s not be renewed. (%s)", $auto_renew->issue_id, $auto_renew->borrowernumber, $auto_renew->itemnumber, $confirm ? 'will' : 'would', $error; } - $updated = 1 if ($error ne $auto_renew->auto_renew_error); - if ( not $auto_renew->auto_renew_error or $updated ) { + $updated = 1 if (!$auto_renew->auto_renew_error || $error ne $auto_renew->auto_renew_error); + if ( $updated ) { $auto_renew->auto_renew_error($error)->store if $confirm; push @{ $report{ $auto_renew->borrowernumber } }, $auto_renew if $error ne 'auto_too_soon' && ( $wants_email && !$wants_digest ); # Do not notify if it's too soon -- 2.39.5