From 3bc322690e85be0c48db6c0c07b723b8b9d07098 Mon Sep 17 00:00:00 2001 From: Klaus Leithoff Date: Mon, 2 Sep 2013 12:51:53 +0000 Subject: [PATCH] throw exception if no name is given for instanciation of template --- etemplate/inc/class.etemplate.inc.php | 1 + 1 file changed, 1 insertion(+) diff --git a/etemplate/inc/class.etemplate.inc.php b/etemplate/inc/class.etemplate.inc.php index 426cf61699..fc0739f316 100644 --- a/etemplate/inc/class.etemplate.inc.php +++ b/etemplate/inc/class.etemplate.inc.php @@ -119,6 +119,7 @@ class etemplate_new extends etemplate_widget_template if (self::$request->output_mode == -1) self::$request->output_mode = 0; self::$request->template = $this->as_array(); + if (empty($this->name)) throw new egw_exception_assertion_failed("Template name is not set '$this->name' !"); // instanciate template to fill self::$request->sel_options for select-* widgets // not sure if we want to handle it this way, thought otherwise we will have a few ajax request for each dialog fetching predefined selectboxes $template = etemplate_widget_template::instance($this->name, $this->template_set, $this->version, $this->laod_via);