bug 3520: fix crash when adding or editing items
authorGalen Charlton <gmcharlt@gmail.com>
Tue, 11 Aug 2009 14:46:20 +0000 (10:46 -0400)
committerGalen Charlton <gmcharlt@gmail.com>
Tue, 11 Aug 2009 14:51:03 +0000 (10:51 -0400)
commit7f7dfa0a11dd5d983deca2c18715b5126a11b12c
tree272ae506007ddda1d38fe3bf0d8da1ba7faead79
parentae5b76c89b8a61ad82528ea85d1c3673f3318a09
bug 3520: fix crash when adding or editing items

Fix the following crash when adding or editing an
item record in the staff interface:

Can't call method "append_fields" on an undefined value at
/usr/local/share/perl/5.10.0/MARC/File/SAX.pm line 92.
 at /usr/local/share/perl/5.10.0/MARC/File/SAX.pm line 92

This crash appears only if a version of MARC::File::XML
greater than 0.88 is installed, and was triggered by
C4::Biblio::TransformHtmlToXml() failing to create a valid
MARCXML blob, which must include a <record> element.

This patch also fixes the indicator values generated by
TransformHtmlToXml(), setting them to " " instead of
"" when no indicator value is supplied.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
C4/Biblio.pm