Please test.
---
 C4/Biblio.pm |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/C4/Biblio.pm b/C4/Biblio.pm
index 4102e23..c3a3094 100644
--- a/C4/Biblio.pm
+++ b/C4/Biblio.pm
@@ -1269,8 +1269,12 @@ sub GetMarcControlnumber {
     # Control number or Record identifier are the same field in MARC21 and 
UNIMARC
     # Keep $marcflavour for possible later use
     if ($marcflavour eq "MARC21" || $marcflavour eq "UNIMARC") {
-        $controlnumber = $record->field('001')->data();
+        my $controlnumberField = $record->field('001');
+        if ($controlnumberField) {
+            $controlnumber = $controlnumberField->data();
+        }
     }
+    return $controlnumber;
 }
 
 =head2 GetMarcNotes
-- 
1.7.1

_______________________________________________
Koha-patches mailing list
[email protected]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-patches
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to