diff --git a/htdocs/html.form.class.php b/htdocs/html.form.class.php index bbf5340009a..78cd3768305 100644 --- a/htdocs/html.form.class.php +++ b/htdocs/html.form.class.php @@ -823,7 +823,6 @@ class Form dol_syslog("Form::select_produits_do sql=".$sql, LOG_DEBUG); $resultd = $this->db->query($sqld); - if ( $resultd ) $objtp = $this->db->fetch_object($resultd); } if ($result) @@ -859,10 +858,10 @@ class Form // Multilangs : modification des donnée si une traduction existe if ($conf->global->MAIN_MULTILANGS) { + if ( $resultd ) $objtp = $this->db->fetch_object($resultd); if ( $objp->rowid == $objtp->fk_product ) // si on a une traduction { if ( $objtp->label != '') $objp->label = $objtp->label; - if ( $resultd ) $objtp = $this->db->fetch_object($resultd); // on charge la traduction suivante } } $opt = '