From 568765b34b74385716274d296670b1fa0eb7e7bc Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Thu, 28 Mar 2024 06:20:29 -0400 Subject: [PATCH] Bug 36159: (QA follow-up): Simplify code to supress warnings Content-Type: text/plain; charset=utf-8 Signed-off-by: Marcel de Rooy --- Koha/Patron.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Koha/Patron.pm b/Koha/Patron.pm index 265bcd78be..3e9211be47 100644 --- a/Koha/Patron.pm +++ b/Koha/Patron.pm @@ -385,8 +385,10 @@ sub store { my @skip_fields = (qw/lastseen updated_on/); for my $key ( keys %{$from_storage} ) { next if any { /$key/ } @skip_fields; - if ( ( $from_storage->{$key} || $from_object->{$key} ) - && ( $from_storage->{$key} ne $from_object->{$key} ) ) + my $storage_value = $from_storage->{$key} // q{}; + my $object_value = $from_object->{$key} // q{}; + if ( ( $storage_value || $object_value ) + && ( $storage_value ne $object_value ) ) { $info->{$key} = { before => $from_storage->{$key}, -- 2.30.2