From 07cfc5d69c83795a8ab1ad6168251f9aab9f87df Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fr=C3=A9d=C3=A9ric=20Demians?= Date: Sun, 7 Nov 2010 14:33:36 +0100 Subject: [PATCH] Bug 5372 (v2) Existing value can be replace by default value The way an existing value was tested was wrong. 0 is a valid value but a false value for Perl. => replace privious proposal. [3.2] Should also apply. Signed-off-by: Chris Cormack --- cataloguing/addbiblio.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cataloguing/addbiblio.pl b/cataloguing/addbiblio.pl index 2cd6e735b4..85c0566328 100755 --- a/cataloguing/addbiblio.pl +++ b/cataloguing/addbiblio.pl @@ -299,7 +299,7 @@ sub create_input { } # if there is no value provided but a default value in parameters, get it - unless ($value) { + if ( $value eq '' ) { $value = $tagslib->{$tag}->{$subfield}->{defaultvalue}; # get today date & replace YYYY, MM, DD if provided in the default value -- 2.39.5