From 8fb243bc08f4e891b5310e53c8cec0f640f52435 Mon Sep 17 00:00:00 2001 From: =?UTF-8?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 --- C4/Biblio.pm | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/C4/Biblio.pm b/C4/Biblio.pm index 915139e..95d5456 100644 --- a/C4/Biblio.pm +++ b/C4/Biblio.pm @@ -1217,7 +1217,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') { -- 1.7.6.1