From 3107e1031820f36e0c9d4776a065fb8e20b10d2e 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: Matt Blenkinsop --- Koha/Patron/Password/Recovery.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Koha/Patron/Password/Recovery.pm b/Koha/Patron/Password/Recovery.pm index 1e462be368..2e625d0311 100644 --- a/Koha/Patron/Password/Recovery.pm +++ b/Koha/Patron/Password/Recovery.pm @@ -158,8 +158,9 @@ sub SendPasswordRecoveryEmail { } ); - my $num_letters_attempted = - C4::Letters::SendQueuedMessages( { message_id => $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.2