From 9125e34c0fb6940bf748b85039aa82710213bc4d 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 --- 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.41.0