From e255ff5fc2c5090374c9cdc65a717bfc07a88e12 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 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Koha/Patron/Password/Recovery.pm b/Koha/Patron/Password/Recovery.pm index 1e462be3683..2e625d03115 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.30.2