diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php
index cf54ade1a64de1e441af136e1039975c4464e0c2..0a0b85dab7aef21f154ec8647e77e80744cec084 100644
--- a/htdocs/core/class/commonobject.class.php
+++ b/htdocs/core/class/commonobject.class.php
@@ -4173,7 +4173,9 @@ abstract class CommonObject
     						$object = new $InfoFieldList[0]($this->db);
     						if ($value)
     						{
-    							$res=$object->fetch(0,$value);
+    							if (is_numeric($value)) $res=$object->fetch($value);
+								else $res=$object->fetch('',$value);
+								
     							if ($res > 0) $this->array_options[$key]=$object->id;
     							else
     							{