Bug 21738: make call of CanBookBeReserved more safe
[koha.git] / C4 / Record.pm
index e741c4f..cde523f 100644 (file)
@@ -300,10 +300,9 @@ sub marc2dcxml {
             croak "The format argument ($format) not accepted.\n" .
                   "Please pass a valid format (oaidc, srwdc, or rdfdc)\n";
         }
-        my $err = $xslt_engine->err; # error number
-        my $errstr = $xslt_engine->errstr; # error message
+        my $err = $xslt_engine->err; # error code
         if ( $err ) {
-            croak "Error when processing $errstr Error number: $err\n";
+            croak "Error $err while processing\n";
         } else {
             return $output;
         }
@@ -473,7 +472,10 @@ sub marcrecord2csv {
     # Getting the record
     my $record = GetMarcBiblio({ biblionumber => $biblio });
     return unless $record;
-    C4::Biblio::EmbedItemsInMarcBiblio( $record, $biblio, $itemnumbers );
+    C4::Biblio::EmbedItemsInMarcBiblio({
+        marc_record  => $record,
+        biblionumber => $biblio,
+        item_numbers => $itemnumbers });
     # Getting the framework
     my $frameworkcode = GetFrameworkCode($biblio);