From f9923fc1a616ffd8824831ab8cb51096a4c5c515 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Mon, 11 Sep 2023 12:47:48 +0100 Subject: [PATCH] Bug 34731: (follow-up) Fix conditional variable declaration Signed-off-by: Martin Renvoize --- Koha/Patron/Password/Recovery.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Koha/Patron/Password/Recovery.pm b/Koha/Patron/Password/Recovery.pm index 879058488e..f18b235c27 100644 --- a/Koha/Patron/Password/Recovery.pm +++ b/Koha/Patron/Password/Recovery.pm @@ -158,7 +158,8 @@ sub SendPasswordRecoveryEmail { } ); - my $num_letters_attempted = C4::Letters::SendQueuedMessages( { message_id => $message_id } ) if $message_id; + my $num_letters_attempted = 0; + $num_letters_attempted = C4::Letters::SendQueuedMessages( { message_id => $message_id } ) if $message_id; return ($num_letters_attempted > 0); } -- 2.41.0