From cd92d22bc08aeeac7b1b1a587e161856371c5f09 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Fri, 30 May 2025 11:41:34 -0300 Subject: [PATCH] Bug 40037: (follow-up) Remove redundancy in `before_send_messages` Signed-off-by: Tomas Cohen Arazi Signed-off-by: David Nind Signed-off-by: Laura_Escamilla Signed-off-by: Lucas Gass (cherry picked from commit 36df107fc9e415e6090f8ded980ea4cc273d9b0f) Signed-off-by: Paul Derscheid --- C4/Letters.pm | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/C4/Letters.pm b/C4/Letters.pm index 514cb14e5f..ae80161898 100644 --- a/C4/Letters.pm +++ b/C4/Letters.pm @@ -1058,15 +1058,13 @@ sub SendQueuedMessages { } ); - if (@plugins) { - foreach my $plugin (@plugins) { - try { - $plugin->before_send_messages($params); - } catch { - warn "$_"; - exit 1 if $params->{exit_on_plugin_failure}; - }; - } + foreach my $plugin (@plugins) { + try { + $plugin->before_send_messages($params); + } catch { + warn "$_"; + exit 1 if $params->{exit_on_plugin_failure}; + }; } }