From c0e0768d579be42c5ee77b5ad737f534723c84a8 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Fri, 29 Jun 2018 10:54:52 -0300 Subject: [PATCH] Bug 20287: (QA follow-up) Fix warning on undefined Signed-off-by: Tomas Cohen Arazi Signed-off-by: Tomas Cohen Arazi Signed-off-by: Martin Renvoize Signed-off-by: Nick Clemens --- Koha/Patron.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Koha/Patron.pm b/Koha/Patron.pm index 420b576058..4ad3124a6a 100644 --- a/Koha/Patron.pm +++ b/Koha/Patron.pm @@ -294,7 +294,10 @@ sub store { my $borrowers_log = C4::Context->preference("BorrowersLog"); my $previous_cardnumber = $self->get_from_storage->cardnumber; - if ( $borrowers_log && $previous_cardnumber ne $self->cardnumber ) + if ($borrowers_log + && ( !defined $previous_cardnumber + || $previous_cardnumber ne $self->cardnumber ) + ) { logaction( "MEMBERS", -- 2.39.5