From 772337f5257c3099e36ea4127d0192eb3c167e76 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 Signed-off-by: Martin Renvoize Signed-off-by: Tomas Cohen Arazi --- 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 455ba848e1..6d25255a2e 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.39.5