From 47e6fd7039eca08406a15ce2e0be2fd0d400ff4b Mon Sep 17 00:00:00 2001 From: =?utf-8?q?Joonas=20Kylm=C3=A4l=C3=A4?= Date: Mon, 8 Jun 2020 15:12:52 +0300 Subject: [PATCH] Bug 11175: (follow-up) Don't return explicitly undef Content-Type: text/plain; charset=utf-8 This would create in list context an list of one element that is undef, which we don't want, we want empty list if there are no components. Signed-off-by: Nick Clemens Signed-off-by: Pasi Kallinen Signed-off-by: Martin Renvoize Signed-off-by: Andrew Nugged Signed-off-by: Marcel de Rooy --- Koha/Biblio.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Koha/Biblio.pm b/Koha/Biblio.pm index ea26ee725b..2d35c94734 100644 --- a/Koha/Biblio.pm +++ b/Koha/Biblio.pm @@ -490,7 +490,7 @@ this object (MARC21 773$w points to this) sub components { my ($self) = @_; - return undef if (C4::Context->preference('marcflavour') ne 'MARC21'); + return if (C4::Context->preference('marcflavour') ne 'MARC21'); if (!defined($self->{_components})) { my $marc = C4::Biblio::GetMarcBiblio({ biblionumber => $self->id }); -- 2.20.1