From d0575c80b4a6780f6b697528c66cc09cc2d70852 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 (cherry picked from commit 60d6d79b2232893ec84488bf17aa32adde8c01be) Signed-off-by: Fridolin Somers --- 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