[Koha-patches] [PATCH] fix uninitialized value warnings during COinS generation
Galen Charlton
galen.charlton at liblime.com
Wed May 27 16:01:54 CEST 2009
---
C4/Biblio.pm | 18 ++++++++++--------
1 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/C4/Biblio.pm b/C4/Biblio.pm
index 27a2795..36d9ad4 100644
--- a/C4/Biblio.pm
+++ b/C4/Biblio.pm
@@ -1050,13 +1050,13 @@ sub GetCOinSBiblio {
my $mtx;
my $genre;
my ($aulast, $aufirst) = ('','');
- my $oauthors;
- my $title;
- my $subtitle;
- my $pubyear;
- my $isbn;
- my $issn;
- my $publisher;
+ my $oauthors = '';
+ my $title = '';
+ my $subtitle = '';
+ my $pubyear = '';
+ my $isbn = '';
+ my $issn = '';
+ my $publisher = '';
if ( C4::Context->preference("marcflavour") eq "UNIMARC" ){
my $fmts6;
@@ -1125,7 +1125,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')){
--
1.5.6.5
More information about the Koha-patches
mailing list