From 5d8d0a625199c26f16f0da2c414382ddc5c74b68 Mon Sep 17 00:00:00 2001 From: Mike Taylor Date: Tue, 14 Nov 2006 16:00:28 +0000 Subject: [PATCH] Do not try to xml_encode() undefined values. --- web/htdocs/details/form.mc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/web/htdocs/details/form.mc b/web/htdocs/details/form.mc index 73536b7..407b302 100644 --- a/web/htdocs/details/form.mc +++ b/web/htdocs/details/form.mc @@ -1,4 +1,4 @@ -%# $Id: form.mc,v 1.1 2006-11-14 14:54:06 mike Exp $ +%# $Id: form.mc,v 1.2 2006-11-14 16:00:28 mike Exp $ <%args> $id => undef $conn @@ -71,7 +71,8 @@ foreach my $ref (@fields) { <% $caption %> -% my $data = xml_encode($xc->find($xpath)); +% my $data = $xc->find($xpath); +% $data = defined $data ? xml_encode($data) : ""; % if ($nlines) { % } else { -- 1.7.10.4