# Formerly named rebuildnonmarc.pl
use strict;
-# use warnings; FIXME someday
+#use warnings; FIXME - Bug 2505
BEGIN {
# find Koha's Perl modules
$sth->execute;
# my ($biblionumbermax) = $sth->fetchrow;
# warn "$biblionumbermax <<==";
+my @errors;
while (my ($biblionumber)= $sth->fetchrow) {
#now, parse the record, extract the item fields, and store them in somewhere else.
my $record = GetMarcBiblio($biblionumber);
+ if (not defined $record) {
+ push @errors, $biblionumber;
+ next;
+ }
my @fields = $record->field($tagfield);
my @items;
my $nbitems=0;
# $dbh->do("unlock tables");
my $timeneeded = time() - $starttime;
print "$i MARC record done in $timeneeded seconds\n";
+if (scalar(@errors) > 0) {
+ print "Some biblionumber could not be processed though: ", join(" ", @errors);
+}
# modified NEWmodbiblio to jump the MARC part of the biblio modif
# highly faster