From 60d6d79b2232893ec84488bf17aa32adde8c01be 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 Signed-off-by: Tomas Cohen Arazi --- 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.39.5