diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index 8f4d5e9b8d7..b4d7f1a74df 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -1613,7 +1613,7 @@ class ExtraFields if (!empty($extrafieldsobjectkey)) { $label = $this->attributes[$extrafieldsobjectkey]['label'][$key]; $type = $this->attributes[$extrafieldsobjectkey]['type'][$key]; - $size = $this->attributes[$extrafieldsobjectkey]['size'][$key]; + $size = $this->attributes[$extrafieldsobjectkey]['size'][$key]; // Can be '255', '24,8'... $default = $this->attributes[$extrafieldsobjectkey]['default'][$key]; $computed = $this->attributes[$extrafieldsobjectkey]['computed'][$key]; $unique = $this->attributes[$extrafieldsobjectkey]['unique'][$key]; @@ -1911,7 +1911,7 @@ class ExtraFields } elseif ($type == 'password') { $value = dol_trunc(preg_replace('/./i', '*', $value), 8, 'right', 'UTF-8', 1); } else { - $showsize = round($size); + $showsize = round((float) $size); if ($showsize > 48) { $showsize = 48; }