From 60447f3a642962bf4f0b7fcac2756b4eec6ec593 Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Wed, 27 May 2009 09:01:00 -0500 Subject: [PATCH] fix uninitialized value warnings during COinS generation Signed-off-by: Galen Charlton --- C4/Biblio.pm | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/C4/Biblio.pm b/C4/Biblio.pm index ba6d62cfcd..822b5abfd1 100755 --- a/C4/Biblio.pm +++ b/C4/Biblio.pm @@ -1037,14 +1037,14 @@ sub GetCOinSBiblio { my $pos6 = substr $record->leader(), 6,1; my $mtx; my $genre; - my ($aulast, $aufirst); - my $oauthors; - my $title; - my $subtitle; - my $pubyear; - my $isbn; - my $issn; - my $publisher; + my ($aulast, $aufirst) = ('',''); + my $oauthors = ''; + my $title = ''; + my $subtitle = ''; + my $pubyear = ''; + my $isbn = ''; + my $issn = ''; + my $publisher = ''; if ( C4::Context->preference("marcflavour") eq "UNIMARC" ){ my $fmts6; @@ -1113,7 +1113,9 @@ sub GetCOinSBiblio { $genre = "&rft.genre=book"; # Setting datas - $oauthors .= "&rft.au=".$record->subfield('100','a'); + if ($record->field('100')) { + $oauthors .= "&rft.au=".$record->subfield('100','a'); + } # others authors if($record->field('700')){ for my $au ($record->field('700')->subfield('a')){ -- 2.39.5