From a4919280d24b5fa9e67d9e455709d507e003f322 Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Thu, 3 Jan 2008 12:36:20 -0600 Subject: [PATCH] quell warning if updating itemnote whose original value is NULL Signed-off-by: Chris Cormack Signed-off-by: Joshua Ferraro --- catalogue/updateitem.pl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/catalogue/updateitem.pl b/catalogue/updateitem.pl index 24b1a7e6ea..3099566402 100755 --- a/catalogue/updateitem.pl +++ b/catalogue/updateitem.pl @@ -53,8 +53,10 @@ for ($damaged,$itemlost,$wthdrawn) { # modify MARC item if input differs from items table. my $item_changes = {}; -if (defined $itemnotes and ($itemnotes ne $item_data_hashref->{'itemnotes'})) { - $item_changes->{'itemnotes'} = $itemnotes; +if (defined $itemnotes) { # i.e., itemnotes parameter passed from form + if ((not defined $item_data_hashref->{'itemnotes'}) or $itemnotes ne $item_data_hashref->{'itemnotes'}) { + $item_changes->{'itemnotes'} = $itemnotes; + } } elsif ($itemlost ne $item_data_hashref->{'itemlost'}) { $item_changes->{'itemlost'} = $itemlost; } elsif ($wthdrawn ne $item_data_hashref->{'wthdrawn'}) { -- 2.39.5