From 4129612c5b6a22f233af22794d12d3f850cbfd7c Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Wed, 8 Apr 2009 15:34:45 -0500 Subject: [PATCH] fix various warnings * Use of uninitialized value in pattern match (m//) at C4/Biblio.pm line 1305 (displaying MARC21 856s that don't have $3) * Use of uninitialized value in multiplication (*) at catalogue/detail.pl line 243. (attemping to calculate average Amazon rating if no Amazon info is available) * opac-detail.pl: Use of uninitialized value in length at C4/External/Amazon.pm line 90 (attempting to calculate length of $isbn if it happens to be undef) Signed-off-by: Galen Charlton Signed-off-by: Henri-Damien LAURENT --- C4/Biblio.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/Biblio.pm b/C4/Biblio.pm index 8d12925504..0886cb2265 100755 --- a/C4/Biblio.pm +++ b/C4/Biblio.pm @@ -1276,7 +1276,7 @@ sub GetMarcUrls { }; $marcurl->{'linktext'} = $link || $s3 || C4::Context->preference('URLLinkText') || $url; $marcurl->{'part'} = $s3 if ($link); - $marcurl->{'toc'} = 1 if ( $s3 =~ /^table/i ); + $marcurl->{'toc'} = 1 if ( defined($s3) && $s3 =~ /^table/i ); } else { $marcurl->{'linktext'} = $field->subfield('2') || C4::Context->preference('URLLinkText') || $url; $marcurl->{'MARCURL'} = $url; -- 2.39.5