Bug 7935 follow-up: DBRev number
[koha_gimpoz] / misc / maintenance / UNIMARC_sync_date_created_with_marc_biblio.pl
old mode 100644 (file)
new mode 100755 (executable)
index c94a5a4..43b5550
@@ -20,6 +20,8 @@ sub updateMarc {
     my $field;
     my $biblio = GetMarcBiblio($id);
 
+    return unless $biblio;
+
     if(!$biblio->field('099'))
     {
         $field = new MARC::Field('099','','',
@@ -69,5 +71,5 @@ if (lc(C4::Context->preference('marcflavour')) eq "unimarc"){
 process();
 } 
 else {
-       print "this script is UNIMARC only and should be used only on unimarc databases";
+       print "this script is UNIMARC only and should be used only on unimarc databases\n";
 }