Index: branches/5.1.x/core/kernel/db/dbitem.php =================================================================== diff -u -r14408 -r14526 --- branches/5.1.x/core/kernel/db/dbitem.php (.../dbitem.php) (revision 14408) +++ branches/5.1.x/core/kernel/db/dbitem.php (.../dbitem.php) (revision 14526) @@ -1,6 +1,6 @@ FieldValues[$field]); } if (!$res) { - $this->SetError($field, 'bad_type', null, $params['type']); + $this->SetError($field, 'bad_type', null, Array ($params['type'])); } } return $res; @@ -846,7 +846,7 @@ $res = $res && mb_strlen($val) >= $params['min_len']; } if (!$res) { - $error_params = Array (getArrayValue($params, 'min_len'), getArrayValue($params, 'max_len')); + $error_params = Array (getArrayValue($params, 'min_len'), getArrayValue($params, 'max_len'), mb_strlen($val)); $this->SetError($field, 'length_out_of_range', null, $error_params); return $res; }