From bfec5ef4c1d16b3dc4cccd3982883a21b09955a6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fr=C3=A9d=C3=A9ric=20Demians?= Date: Thu, 10 Feb 2011 17:42:53 +0000 Subject: [PATCH] Bug 5727 Warning in log due to XSLT.pm XSLT.pm add few syspref to MARCXML record send to be transformed by XSLT. If one of those syspref doesn't exist, it generated a warning. Signed-off-by: Colin Campbell Signed-off-by: Chris Cormack --- C4/XSLT.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/C4/XSLT.pm b/C4/XSLT.pm index 78443303b9..f1c5293ea6 100644 --- a/C4/XSLT.pm +++ b/C4/XSLT.pm @@ -129,9 +129,9 @@ sub XSLTParse4Display { my $xmlrecord = $record->as_xml(C4::Context->preference('marcflavour')); my $sysxml = "\n"; foreach my $syspref ( qw/OPACURLOpenInNewWindow DisplayOPACiconsXSLT URLLinkText viewISBD OPACBaseURL/ ) { - $sysxml .= "" . - C4::Context->preference( $syspref ) . - "\n"; + my $sp = C4::Context->preference( $syspref ); + next unless defined($sp); + $sysxml .= "$sp\n"; } $sysxml .= "\n"; $xmlrecord =~ s/\<\/record\>/$itemsxml$sysxml\<\/record\>/; -- 2.39.5