From f49a9e1a4db9710c776c6d917e9cd456c609ef0f Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 21 Feb 2024 13:46:29 +0100 Subject: [PATCH] Bug 36170: Wrong error variable in memberentry It is hidding an important error. $@ is never set here, we need $_ (inside a try-catch) Signed-off-by: Katrin Fischer (cherry picked from commit cd9de702e2bb9aff991e92b04d2889c91a3dcd58) Signed-off-by: Fridolin Somers --- members/memberentry.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/members/memberentry.pl b/members/memberentry.pl index 57e780cfec..e242312211 100755 --- a/members/memberentry.pl +++ b/members/memberentry.pl @@ -437,7 +437,7 @@ if ((!$nok) and $nodouble and ($op eq 'insert' or $op eq 'save')){ } else { # FIXME Urgent error handling here, we cannot fail without relevant feedback # Lot of code will need to be removed from this script to handle exceptions raised by Koha::Patron->store - warn "Patron creation failed! - $@"; # Maybe we must die instead of just warn + warn "Patron creation failed! - $_"; # Maybe we must die instead of just warn push @messages, {error => 'error_on_insert_patron'}; } $op = "add"; -- 2.39.5