diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index cf54ade1a64..0a0b85dab7a 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 { diff --git a/htdocs/core/class/utils.class.php b/htdocs/core/class/utils.class.php index dd4096c5257..2724d64f17f 100644 --- a/htdocs/core/class/utils.class.php +++ b/htdocs/core/class/utils.class.php @@ -168,7 +168,7 @@ class Utils // Check type parameter if ($type == 'auto') $type = $db->type; - if (! in_array($type, array('pgsql', 'mysql', 'mysqli'))) + if (! in_array($type, array('pgsql', 'mysql', 'mysqli','mysqlnobin'))) { $langs->load("errors"); $this->error=$langs->transnoentitiesnoconv("ErrorBadValueForParameter", $type, "Basetype"); diff --git a/htdocs/install/mysql/tables/llx_multicurrency_rate.sql b/htdocs/install/mysql/tables/llx_multicurrency_rate.sql index 74661088751..545807c8aed 100644 --- a/htdocs/install/mysql/tables/llx_multicurrency_rate.sql +++ b/htdocs/install/mysql/tables/llx_multicurrency_rate.sql @@ -23,5 +23,5 @@ CREATE TABLE llx_multicurrency_rate date_sync datetime DEFAULT NULL, rate double NOT NULL DEFAULT 0, fk_multicurrency integer NOT NULL, - entity integer DEFAULT 1, -) ENGINE=innodb; \ No newline at end of file + entity integer DEFAULT 1 +) ENGINE=innodb;