From 22d51cdd07cc26fc25e5a2166ef59ad3f2cb00db 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 Signed-off-by: Marcel de Rooy Signed-off-by: Katrin Fischer --- 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.39.5