diff --git a/etemplate/inc/class.boetemplate.inc.php b/etemplate/inc/class.boetemplate.inc.php index a2a0e13c52..01deb420c1 100644 --- a/etemplate/inc/class.boetemplate.inc.php +++ b/etemplate/inc/class.boetemplate.inc.php @@ -478,6 +478,17 @@ class boetemplate extends soetemplate return (self::$extensions[$type] || $this->loadExtension($type,$ui)) && ($function == '' || self::$extensions[$type]->public_functions[$function]); } + + /** + * Check if we have a widget of type $type + * + * @param string $type + * @return boolean true widget exists, false unknow widget type + */ + public function widgetExists($type) + { + return isset(self::$types[$tpye]) || $this->haveExtension($type); + } /** * executes the pre_process-function of the extension $cell[type] diff --git a/etemplate/inc/class.historylog_widget.inc.php b/etemplate/inc/class.historylog_widget.inc.php index aa27a1b604..0a63d3571f 100644 --- a/etemplate/inc/class.historylog_widget.inc.php +++ b/etemplate/inc/class.historylog_widget.inc.php @@ -77,7 +77,8 @@ class historylog_widget $cell = etemplate::empty_cell($type,$cell['name'],array('readonly' => true,'size' => $options)); if (is_array($type)) { - if (isset($type[0])) // numeric indexed array --> multiple values of 1:N releation + if (isset($type[0]) && // numeric indexed array --> multiple values of 1:N releation + $tmpl->widgetExists($type[0])) { $cell['type'] = 'vbox'; $cell['size'] = '0,,0,0';