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)
committerHenri-Damien LAURENT <henridamien.laurent@biblibre.com>
Wed, 16 Sep 2009 21:19:25 +0000 (23:19 +0200)
commite0f1beb40ee59fda4bc8d5e0944e76c6cb22e03e
tree8e20233a246487eba61b3463166d4adf59694291
parent87ebf23ea988dc684aa863027c4e6d1e3cd8a0f0
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>
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
C4/Biblio.pm