From 7621591ae697328798a44a95757352a147e33d72 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fr=C3=A9d=C3=A9ric=20Demians?= Date: Sun, 25 Sep 2011 11:25:25 +0200 Subject: [PATCH] Bug 6912 Test 008 presence in get CoinS function Signed-off-by: Jared Camins-Esakov Signed-off-by: Paul Poulain Signed-off by: Ian Walls Signed-off-by: Chris Cormack --- C4/Biblio.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/C4/Biblio.pm b/C4/Biblio.pm index 102fa0f0c9..752ebe9ec5 100644 --- a/C4/Biblio.pm +++ b/C4/Biblio.pm @@ -1219,7 +1219,8 @@ sub GetCOinSBiblio { $subtitle = $record->subfield( '245', 'b' ) || ''; $title .= $subtitle; if ($titletype eq 'a') { - $pubyear = substr $record->field('008')->data(), 7, 4; + $pubyear = $record->field('008') || ''; + $pubyear = substr($pubyear->data(), 7, 4) if $pubyear; $isbn = $record->subfield( '773', 'z' ) || ''; $issn = $record->subfield( '773', 'x' ) || ''; if ($mtx eq 'journal') { -- 2.39.5