From a1e4729bde4c1c760637f89fdce20f7b26036d15 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 Content-Type: text/plain; charset=utf-8 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). --- 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.30.2