From d633ce970acc27917c6ed1afc640c40dbd6f6403 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Fri, 16 Jan 2015 18:10:30 +0000 Subject: [PATCH] Don't try to transform missing templates, it doesn't end well. --- etemplate/inc/class.etemplate_widget_transformer.inc.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/etemplate/inc/class.etemplate_widget_transformer.inc.php b/etemplate/inc/class.etemplate_widget_transformer.inc.php index 18b745b29a..34ba40bd85 100644 --- a/etemplate/inc/class.etemplate_widget_transformer.inc.php +++ b/etemplate/inc/class.etemplate_widget_transformer.inc.php @@ -141,8 +141,11 @@ abstract class etemplate_widget_transformer extends etemplate_widget // If the widget has been transformed into a template, we // also need to try and instanciate & parse the template too $transformed_template = etemplate_widget_template::instance($attrs['template']); - $this->expand_widget($transformed_template, $expand); - $transformed_template->run('beforeSendToClient',array($cname,$expand)); + if($transformed_template) + { + $this->expand_widget($transformed_template, $expand); + $transformed_template->run('beforeSendToClient',array($cname,$expand)); + } } default: self::setElementAttribute($form_name, $attr, $val);