From afe97dc6621df9d554ce440303af16236a9c0779 Mon Sep 17 00:00:00 2001 From: Eisbehr Date: Wed, 17 May 2017 09:48:15 +0200 Subject: [PATCH] fix 'buttons' check to prevent errors it could cause problems while generating, when 'buttons' is not present or in wrong format --- templates/home.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/templates/home.php b/templates/home.php index c14c386..d6bcc09 100755 --- a/templates/home.php +++ b/templates/home.php @@ -27,8 +27,10 @@ foreach ($page['entry_page'] as $key => $node) { echo '' . $key . ''; } - foreach ($params['html']['buttons'] as $name => $link ) { - echo '' . $name . ''; + if(isset($params['html']['buttons']) && is_array($params['html']['buttons'])) { + foreach ($params['html']['buttons'] as $name => $link ) { + echo '' . $name . ''; + } } ?>