From 791eba53e47f76e9b21108072a8ca5d042d8b26b Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Wed, 21 Jun 2023 11:48:27 +0000 Subject: [PATCH] Bug 31383: (QA follow-up) Do not return 0 in ->get The last statement evaluated is the if( $content->count ). If that evaluates to false, the false expression value is returned. In this case that is 0. We should just return undef or empty list (scalar/list context). Signed-off-by: Marcel de Rooy --- Koha/Template/Plugin/AdditionalContents.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/Koha/Template/Plugin/AdditionalContents.pm b/Koha/Template/Plugin/AdditionalContents.pm index 455ba848e12..6d25255a2e7 100644 --- a/Koha/Template/Plugin/AdditionalContents.pm +++ b/Koha/Template/Plugin/AdditionalContents.pm @@ -53,6 +53,7 @@ sub get { blocktitle => $blocktitle }; } + return; } sub get_opac_news_by_id { -- 2.25.1