From eb946feab756a15f9fcc5ed44565cd474c5f7646 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Wed, 18 Dec 2019 18:53:04 +0000 Subject: [PATCH] Bug 24268: Break assignment and warn into separate actions Signed-off-by: Liz Rea Signed-off-by: Jonathan Druart Signed-off-by: Martin Renvoize Signed-off-by: Joy Nelson --- misc/cronjobs/advance_notices.pl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/misc/cronjobs/advance_notices.pl b/misc/cronjobs/advance_notices.pl index af97c4103b..bc0d54390d 100755 --- a/misc/cronjobs/advance_notices.pl +++ b/misc/cronjobs/advance_notices.pl @@ -578,7 +578,11 @@ sub send_digests { branchcode => $branchcode, message_transport_type => $transport } - ) || warn "no letter of type '$params->{letter_type}' found for borrowernumber $borrowernumber. Please see sample_notices.sql"; + ); + unless ( $letter ){ + warn "no letter of type '$params->{letter_type}' found for borrowernumber $borrowernumber. Please see sample_notices.sql"; + next; + } push @letters, $letter if $letter; } -- 2.39.5