Avoids generating a slew of warnings in the log when the undefined
value was concatenated or used in regexps
---
C4/Biblio.pm | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/C4/Biblio.pm b/C4/Biblio.pm
index 803a921..d20d747 100644
--- a/C4/Biblio.pm
+++ b/C4/Biblio.pm
@@ -2184,10 +2184,14 @@ sub PrepareItemrecordDisplay {
$tagslib->{$tag}->{$subfield}->{repeatable};
$subfield_data{hidden} = "display:none"
if $tagslib->{$tag}->{$subfield}->{hidden};
- my ( $x, $value );
- ( $x, $value ) = _find_value( $tag, $subfield, $itemrecord )
- if ($itemrecord);
- $value =~ s/"/"/g;
+ my ( $x, $value );
+ if ($itemrecord) {
+ ( $x, $value ) = _find_value( $tag, $subfield,
$itemrecord );
+ }
+ if (!defined $value) {
+ $value = q||;
+ }
+ $value =~ s/"/"/g;
# search for itemcallnumber if applicable
if ( $tagslib->{$tag}->{$subfield}->{kohafield} eq
--
1.6.2.5
_______________________________________________
Koha-patches mailing list
[email protected]
http://lists.koha.org/mailman/listinfo/koha-patches