From 08618c124ad36671a9c9079d8c0e95cb6493b83f Mon Sep 17 00:00:00 2001
From: Laurent Destailleur <eldy@users.sourceforge.net>
Date: Fri, 7 Apr 2006 21:04:14 +0000
Subject: [PATCH] Fix: Suppression warning php

---
 htdocs/html.form.class.php | 25 +++++++++++++------------
 1 file changed, 13 insertions(+), 12 deletions(-)

diff --git a/htdocs/html.form.class.php b/htdocs/html.form.class.php
index 4d333523ea8..ce31fa22bb0 100644
--- a/htdocs/html.form.class.php
+++ b/htdocs/html.form.class.php
@@ -991,23 +991,24 @@ class Form
         $cat = new Categorie ($this -> db);
 		$cat->get_categories_arbo();
 		$cate_arbo = $cat->get_arbo_each_cate();
-		$output= '<select name="'.$select_name.'">'; //creation des categories meres
+		$output = '<select name="'.$select_name.'">'; //creation des categories meres
 		$output.= '<option value="-1" id="choix">'.$langs->trans("NoneCategory").'</option>\n';
 		
-		
-		foreach($cate_arbo as $key => $value)
+		if ($cate_arbo)
 		{
-			if($value[1] == $selected)
-				$add = "selected='true' ";
-			else
-				$add = "";
-			$output.= '<option '.$add.'value="'.$value[1].'">'.$value[0].'</option>';
+			foreach($cate_arbo as $key => $value)
+			{
+				if($value[1] == $selected)
+					$add = "selected='true' ";
+				else
+					$add = "";
+				$output.= '<option '.$add.'value="'.$value[1].'">'.$value[0].'</option>';
+			}
 		}
-					 
+							 
 		$output.= '</select>';
-			return $output; 
-				
-		}
+		return $output; 
+	}
         
         
 
-- 
GitLab