From 0e1bc5db8202f94aa88cb69905ff0106f2896497 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Mon, 10 Jul 2017 14:54:56 +0200 Subject: [PATCH] Bug 18923: Warning in Biblio::GetCOinSBiblio Use of uninitialized value in concatenation (.) or string at C4/Biblio.pm line 1456. Note: In current master this is now line 1370 (Oct 9, 2017). Test plan: Enable COinSinOPACResults. Select a record with leader pos6==a and pos7==a. This triggers genre to be journalArticle and titletype to be a. Without this patch, do an opac search that includes this record. Check the log. You should see the warning. Apply this patch, search again and check the log. The warning should not be repeated again. Signed-off-by: Marcel de Rooy Signed-off-by: Owen Leonard Signed-off-by: Julian Maurice Signed-off-by: Jonathan Druart (cherry picked from commit a82d54d4b4f5eb7aa7d45afc13dac0a80c86f9ce) Signed-off-by: Fridolin Somers --- C4/Biblio.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/C4/Biblio.pm b/C4/Biblio.pm index d52d7807af..4ba09127e1 100644 --- a/C4/Biblio.pm +++ b/C4/Biblio.pm @@ -1425,9 +1425,9 @@ sub GetCOinSBiblio { $isbn = $record->subfield( '773', 'z' ) || ''; $issn = $record->subfield( '773', 'x' ) || ''; if ($mtx eq 'journal') { - $title .= "&rft.title=" . (($record->subfield( '773', 't' ) || $record->subfield( '773', 'a'))); + $title .= "&rft.title=" . ( $record->subfield( '773', 't' ) || $record->subfield( '773', 'a') || q{} ); } else { - $title .= "&rft.btitle=" . (($record->subfield( '773', 't' ) || $record->subfield( '773', 'a')) || ''); + $title .= "&rft.btitle=" . ( $record->subfield( '773', 't' ) || $record->subfield( '773', 'a') || q{} ); } foreach my $rel ($record->subfield( '773', 'g' )) { if ($pages) { -- 2.39.5