From e3841ba2b206eb053f3d4547ddeaec15ce6b82bd Mon Sep 17 00:00:00 2001
From: Didier Gautheron <didier.gautheron@biblibre.com>
Date: Mon, 30 Aug 2021 16:26:05 +0200
Subject: [PATCH] Bug 28921: Argument "" isn't numeric in numeric gt (>) at
 /home/koha/src/koha-tmpl/opac-tmpl/bootstrap/en/includes/html_helpers.inc
 line 23.
Content-Type: text/plain; charset=utf-8

To test:
1 - Open OPAC main page
2 - Check opac-error.log or plack-opac-error.log for message as above
3 - Apply patch
4 - Open OPAC main page
5 - Check opac-error.log again, there should be no more warnings

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
---
 koha-tmpl/opac-tmpl/bootstrap/en/includes/html_helpers.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/html_helpers.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/html_helpers.inc
index f292178697..7a964de596 100644
--- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/html_helpers.inc
+++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/html_helpers.inc
@@ -9,7 +9,7 @@
 [% END %]
 
 [% BLOCK koha_news_block %]
-    [% IF ( news.content.count > 0 ) %]
+    [% IF ( news.content && news.content.count > 0 ) %]
         <div id="[% news.location | html %]">
             [% FOREACH n IN news.content %]
                 <div class="[% n.lang | html %]_item">
-- 
2.20.1