diff --git a/lam/templates/lists/listgroups.php b/lam/templates/lists/listgroups.php index 9373f5bb..d1a8cb1a 100644 --- a/lam/templates/lists/listgroups.php +++ b/lam/templates/lists/listgroups.php @@ -200,7 +200,7 @@ for ($i = $table_begin; $i < $table_end; $i++) { // print all attribute entries seperated by "; " if (sizeof($grp_info[$i][strtolower($attr_array[$k])]) > 0) { // delete first array entry which is "count" - if (! $_GET['norefresh']) array_shift($grp_info[$i][strtolower($attr_array[$k])]); + if ((! $_GET['norefresh']) && (is_array($grp_info[$i][strtolower($attr_array[$k])]))) array_shift($grp_info[$i][strtolower($attr_array[$k])]); // generate links for group members if (strtolower($attr_array[$k]) == "memberuid") { $linklist = array(); @@ -213,7 +213,10 @@ for ($i = $table_begin; $i < $table_end; $i++) { } // print all other attributes else { - echo implode("; ", $grp_info[$i][strtolower($attr_array[$k])]); + if (is_array($grp_info[$i][strtolower($attr_array[$k])])) { + echo implode("; ", $grp_info[$i][strtolower($attr_array[$k])]); + } + else echo $grp_info[$i][strtolower($attr_array[$k])]; } } echo (""); diff --git a/lam/templates/lists/listhosts.php b/lam/templates/lists/listhosts.php index 102cde99..af5aa562 100644 --- a/lam/templates/lists/listhosts.php +++ b/lam/templates/lists/listhosts.php @@ -206,8 +206,9 @@ for ($i = $table_begin; $i < $table_end; $i++) { // print all attribute entries seperated by "; " if (sizeof($hst_info[$i][strtolower($attr_array[$k])]) > 0) { // delete first array entry which is "count" - if (! $_GET['norefresh']) array_shift($hst_info[$i][strtolower($attr_array[$k])]); - echo implode("; ", $hst_info[$i][strtolower($attr_array[$k])]); + if ((! $_GET['norefresh']) && (is_array($hst_info[$i][strtolower($attr_array[$k])]))) array_shift($hst_info[$i][strtolower($attr_array[$k])]); + if (is_array($hst_info[$i][strtolower($attr_array[$k])])) echo implode("; ", $hst_info[$i][strtolower($attr_array[$k])]); + else echo $hst_info[$i][strtolower($attr_array[$k])]; } echo (""); }