Adding some error proof on GetMarcRecord
[koha.git] / misc / migration_tools / 22_to_30 / rebuild_unimarc_100.pl
index 60b1b87..1ef4049 100755 (executable)
@@ -30,7 +30,7 @@ while (my ($biblionumber,$time)=$sth->fetchrow ){
 # print "record : $biblionumber \n";
     my $record = GetMarcBiblio($biblionumber);
 # print "=> ".$record->as_formatted;
-    MARCmodrecord($biblionumber,$record,$time);
+    MARCmodrecord($biblionumber,$record,$time) if ($record);
 #
 }