diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index 7c34411306b..fc088c0bd13 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -233,21 +233,21 @@ class Form
}
if (preg_match('/^(string|safehtmlstring|email)/', $typeofdata)) {
$tmp = explode(':', $typeofdata);
- $ret .= '';
+ $ret .= '';
} elseif (preg_match('/^(integer)/', $typeofdata)) {
$tmp = explode(':', $typeofdata);
$valuetoshow = price2num($editvalue ? $editvalue : $value, 0);
- $ret .= '';
+ $ret .= '';
} elseif (preg_match('/^(numeric|amount)/', $typeofdata)) {
$tmp = explode(':', $typeofdata);
$valuetoshow = price2num($editvalue ? $editvalue : $value);
- $ret .= '';
+ $ret .= '';
} elseif (preg_match('/^(checkbox)/', $typeofdata)) {
$tmp = explode(':', $typeofdata);
- $ret .= '';
+ $ret .= '';
} elseif (preg_match('/^text/', $typeofdata) || preg_match('/^note/', $typeofdata)) { // if wysiwyg is enabled $typeofdata = 'ckeditor'
$tmp = explode(':', $typeofdata);
- $cols = $tmp[2];
+ $cols = (empty($tmp[2]) ? '' : $tmp[2]);
$morealt = '';
if (preg_match('/%/', $cols)) {
$morealt = ' style="width: '.$cols.'"';
@@ -255,7 +255,7 @@ class Form
}
$valuetoshow = ($editvalue ? $editvalue : $value);
- $ret .= '