[Koha-bugs] [Bug 20551] Add option for including deleted records in export_records.pl

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Mar 18 10:59:17 CET 2022


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20551

Marcel de Rooy <m.de.rooy at rijksmuseum.nl> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |m.de.rooy at rijksmuseum.nl

--- Comment #57 from Marcel de Rooy <m.de.rooy at rijksmuseum.nl> ---
+    my $marc_flavour = C4::Context->preference('marcflavour');
+    my $biblio_metadata = $resultset->find({
+        'biblionumber' => $biblionumber,
+        'format' => 'marcxml',
+        'marcflavour' => $marc_flavour
+    });
+    my $marc_xml = $biblio_metadata->metadata;
+    $marc_xml = StripNonXmlChars($marc_xml);
+
+    my $record = eval {
+        MARC::Record::new_from_xml($marc_xml, 'UTF-8', $marc_flavour)
+    };
+    if (!$record) {

You test $record, but you should have tested $biblio_metadata too ?
Otherwise you already crash on ->metadata..

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list