From a0e8b86876e6071c15cc476894b203f18a3c2f98 Mon Sep 17 00:00:00 2001 From: Cameron Date: Mon, 25 Sep 2017 15:43:24 -0700 Subject: [PATCH] Display an error when news template is empty or not found. --- e107_handlers/news_class.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/e107_handlers/news_class.php b/e107_handlers/news_class.php index b72aeb3de..7c1dc4f4c 100644 --- a/e107_handlers/news_class.php +++ b/e107_handlers/news_class.php @@ -818,8 +818,16 @@ class e_news_tree extends e_front_tree_model return ''; } + if(is_string($template) || empty($template)) + { + return "
Couldn't find template/layout with the following params: ".print_a($parms,true)."
"; + } + $ret = array(); $tp = e107::getParser(); + $start = ''; + $end = ''; + $param = $parms; $param['current_action'] = 'list'; // TODO more default parameters