diff --git a/etemplate/inc/class.tab_widget.inc.php b/etemplate/inc/class.tab_widget.inc.php index ac89f41c34..a30c45625c 100644 --- a/etemplate/inc/class.tab_widget.inc.php +++ b/etemplate/inc/class.tab_widget.inc.php @@ -85,8 +85,6 @@ $labels = array_values($labels); } } - $all_names = implode('|',$names); - $tab_widget = new etemplate('etemplate.tab_widget'); $tab_widget->no_onclick = true; @@ -105,6 +103,8 @@ $selected_tab = $name; } } + $all_names = implode('|',$names); + if (empty($selected_tab)) { $value = $selected_tab = $names[0];