diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index 00032262c70..c763ef19f84 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -610,6 +610,7 @@ class Commande extends CommonOrder return -1; } } + return 0; } /** diff --git a/htdocs/contrat/class/api_contracts.class.php b/htdocs/contrat/class/api_contracts.class.php index da364e925e4..0bc02458869 100644 --- a/htdocs/contrat/class/api_contracts.class.php +++ b/htdocs/contrat/class/api_contracts.class.php @@ -40,7 +40,7 @@ class Contracts extends DolibarrApi ); /** - * @var Contract $contract {@type Contrat} + * @var Contrat $contract {@type Contrat} */ public $contract; @@ -156,6 +156,7 @@ class Contracts extends DolibarrApi { $num = $db->num_rows($result); $min = min($num, ($limit <= 0 ? $num : $limit)); + $i=0; while ($i < $min) { $obj = $db->fetch_object($result); diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 24827ce0cd4..a959a7f585d 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -101,7 +101,7 @@ abstract class CommonObject // Following vars are used by some objects only. We keep this property here in CommonObject to be able to provide common method using them. /** - * @var string[] Can be used to pass information when only object is provided to method + * @var array Can be used to pass information when only object is provided to method */ public $context=array(); diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index 68463aebb5b..c637155e48b 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -974,6 +974,7 @@ class ExtraFields { $param_list=array_keys($param['options']); $InfoFieldList = explode(":", $param_list[0]); + $parentName=''; // 0 : tableName // 1 : label field name // 2 : key fields name (if differ of rowid) @@ -1058,8 +1059,9 @@ class ExtraFields $obj = $this->db->fetch_object($resql); // Several field into label (eq table:code|libelle:rowid) + $notrans = false; $fields_label = explode('|',$InfoFieldList[1]); - if(is_array($fields_label)) + if (is_array($fields_label)) { $notrans = true; foreach ($fields_label as $field_toshow) @@ -1073,7 +1075,7 @@ class ExtraFields } $labeltoshow=dol_trunc($labeltoshow,45); - if ($value==$obj->rowid) + if ($value == $obj->rowid) { foreach ($fields_label as $field_toshow) { @@ -1088,7 +1090,7 @@ class ExtraFields } else { - if(!$notrans) + if (! $notrans) { $translabel=$langs->trans($obj->{$InfoFieldList[1]}); if ($translabel!=$obj->{$InfoFieldList[1]}) { diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index f1a16df9375..f93b1ebf984 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -4751,6 +4751,12 @@ class Form $smin = dol_print_date($set_time, "%M"); $ssec = dol_print_date($set_time, "%S"); } + else + { + $shour = ''; + $smin = ''; + $ssec = ''; + } } else {