From 9df6a7d14f3dd869c00e514d7c3c45238aaaccc0 Mon Sep 17 00:00:00 2001 From: Fridolin Somers Date: Fri, 12 Apr 2019 11:51:52 +0200 Subject: [PATCH] Bug 21975: (follow-up) avoid undef in eq Signed-off-by: Martin Renvoize Signed-off-by: Katrin Fischer Signed-off-by: Nick Clemens --- 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.39.5