From 11a1cba68a80a09a0c13b1e117ffbbe789da146b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Wed, 16 Jun 2021 12:10:21 +0200 Subject: [PATCH 1/3] fix warning --- htdocs/cron/card.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/cron/card.php b/htdocs/cron/card.php index fb8699b911e..7911194603b 100644 --- a/htdocs/cron/card.php +++ b/htdocs/cron/card.php @@ -284,6 +284,7 @@ if ($conf->use_javascript_ajax) { print ''."\n"; } +$formconfirm = ''; if ($action == 'delete') { $formconfirm = $form->formconfirm($_SERVER['PHP_SELF']."?id=".$object->id, $langs->trans("CronDelete"), $langs->trans("CronConfirmDelete"), "confirm_delete", '', '', 1); From d5cb81982d3fb558d51f59cd18a20bc56a92ebc0 Mon Sep 17 00:00:00 2001 From: Antonin MARCHAL Date: Wed, 16 Jun 2021 14:21:23 +0200 Subject: [PATCH 2/3] fix wrong display on extrafields type = double --- htdocs/core/class/extrafields.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index 16d58f51eb3..8f4d5e9b8d7 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 = (int) $this->attributes[$extrafieldsobjectkey]['size'][$key]; + $size = $this->attributes[$extrafieldsobjectkey]['size'][$key]; $default = $this->attributes[$extrafieldsobjectkey]['default'][$key]; $computed = $this->attributes[$extrafieldsobjectkey]['computed'][$key]; $unique = $this->attributes[$extrafieldsobjectkey]['unique'][$key]; From b2221d2c3a10a82fb5bd055a636f1cbed187b220 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 16 Jun 2021 14:31:22 +0200 Subject: [PATCH 3/3] Update extrafields.class.php --- htdocs/core/class/extrafields.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; }