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 <katrin.fischer@bsz-bw.de>
(cherry picked from commit cd9de702e2)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit f49a9e1a4d)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
Jonathan Druart 2024-02-21 13:46:29 +01:00 committed by Lucas Gass
parent c8f54b7ba2
commit 0b89414d0c
1 changed files with 1 additions and 1 deletions

View File

@ -396,7 +396,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";