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\>/;