From c91b1e773c9b00147e7bc56ecc6bfb3f54aa5bba Mon Sep 17 00:00:00 2001 From: Fridolin Somers Date: Fri, 12 Apr 2019 11:51:52 +0200 Subject: [PATCH] Bug 21975 : (followup 2) avoid undef in eq Signed-off-by: Martin Renvoize --- C4/Items.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/Items.pm b/C4/Items.pm index f0f70c7307..fdf262f7ed 100644 --- a/C4/Items.pm +++ b/C4/Items.pm @@ -2643,7 +2643,7 @@ sub ToggleNewStatus { my $itemnumber = $values->{itemnumber}; for my $substitution ( @$substitutions ) { next unless $substitution->{field}; - next if ( $values->{ $substitution->{item_field} } eq $substitution->{value} ); + next if ( defined $values->{ $substitution->{item_field} } and $values->{ $substitution->{item_field} } eq $substitution->{value} ); C4::Items::ModItem( { $substitution->{item_field} => $substitution->{value} }, $biblionumber, $itemnumber ) unless $report_only; push @{ $report->{$itemnumber} }, $substitution; -- 2.20.1