Zero is a valid value for an tag. bug #3399
authorWolfram Schneider <wosch@indexdata.dk>
Tue, 27 Apr 2010 16:33:47 +0000 (18:33 +0200)
committerWolfram Schneider <wosch@indexdata.dk>
Tue, 27 Apr 2010 16:33:47 +0000 (18:33 +0200)
lib/ZOOM/IRSpy/Utils.pm

index 4c73adf..2f76045 100644 (file)
@@ -352,7 +352,7 @@ sub modify_xml_document {
            }
 
        } else {
            }
 
        } else {
-           next if !$value; # No need to create a new empty node
+           next if !defined $value; # No need to create a new empty node
            my($ppath, $selector) = $xpath =~ /(.*)\/(.*)/;
            dom_add_node($xc, $ppath, $selector, $value, @addAfter);
            #print "New $key ($xpath) = '$value'<br/>\n";
            my($ppath, $selector) = $xpath =~ /(.*)\/(.*)/;
            dom_add_node($xc, $ppath, $selector, $value, @addAfter);
            #print "New $key ($xpath) = '$value'<br/>\n";