From 7c1abf6341d4bbdf21e009e8aba770c2d31aadf3 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 --- C4/Letters.pm | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/C4/Letters.pm b/C4/Letters.pm index c90f335f2b..b1ac8db59c 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}; + }; } } -- 2.39.5