From 8ab3cdc09cfbac3157e996664616c229214f6c8d Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Fri, 21 Oct 2011 06:03:56 -0400
Subject: [PATCH] Merged revisions 2681-2739 from 3.0.4 stable branch.

---
 interface/lib/classes/listform_actions.inc.php |   18 ++++++++++--------
 1 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/interface/lib/classes/listform_actions.inc.php b/interface/lib/classes/listform_actions.inc.php
index 70d6652..a35aca9 100644
--- a/interface/lib/classes/listform_actions.inc.php
+++ b/interface/lib/classes/listform_actions.inc.php
@@ -86,15 +86,17 @@
 		$rec['bgcolor'] = $this->DataRowColor;
 		
 		//* substitute value for select fields
-		foreach($app->listform->listDef['item'] as $field) {
-			$key = $field['field'];
-			if(isset($field['formtype']) && $field['formtype'] == 'SELECT') {
-				if(strtolower($rec[$key]) == 'y' or strtolower($rec[$key]) == 'n') {
-					// Set a additional image variable for bolean fields
-					$rec['_'.$key.'_'] = (strtolower($rec[$key]) == 'y')?'x16/tick_circle.png':'x16/cross_circle.png';
+		if(is_array($app->listform->listDef['item']) && count($app->listform->listDef['item']) > 0) {
+			foreach($app->listform->listDef['item'] as $field) {
+				$key = $field['field'];
+				if(isset($field['formtype']) && $field['formtype'] == 'SELECT') {
+					if(strtolower($rec[$key]) == 'y' or strtolower($rec[$key]) == 'n') {
+						// Set a additional image variable for bolean fields
+						$rec['_'.$key.'_'] = (strtolower($rec[$key]) == 'y')?'x16/tick_circle.png':'x16/cross_circle.png';
+					}
+					//* substitute value for select field
+					$rec[$key] = @$field['value'][$rec[$key]];
 				}
-				//* substitute value for select field
-				$rec[$key] = @$field['value'][$rec[$key]];
 			}
 		}
 		

--
Gitblit v1.9.1