Bug 6912 Test 008 presence in get CoinS function

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
(cherry picked from commit 7621591ae6)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
This commit is contained in:
Frédéric Demians 2011-09-25 11:25:25 +02:00 committed by Chris Nighswonger
parent 0dd0768f18
commit 6591d95ddd
1 changed files with 2 additions and 1 deletions

View File

@ -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') {