From f90f92f80f54b658843281bd7eb013cc87786ce9 Mon Sep 17 00:00:00 2001 From: Katrin Fischer Date: Sun, 28 Nov 2010 13:40:36 +0100 Subject: [PATCH] Bug 5430: Follow-up, fixes error message when no 001 exists Signed-off-by: Chris Cormack --- C4/Biblio.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/C4/Biblio.pm b/C4/Biblio.pm index 4102e23037..c3a30946db 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 -- 2.39.5