Skip to content

Commit 7e3951d

Browse files
committed
Do not automatically truncate text fields
1 parent 9bb7830 commit 7e3951d

File tree

1 file changed

+0
-15
lines changed

1 file changed

+0
-15
lines changed

src/CommonDBTM.php

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4419,21 +4419,6 @@ public function filterValues($display = true)
44194419
}
44204420
break;
44214421

4422-
case 'email':
4423-
case 'string':
4424-
case 'itemlink':
4425-
// Some 'completename' fields may be typed as 'itemlink' (e.g., in CommonTreeDropdown::class).
4426-
// These should be excluded from the length check, as they are stored as TEXT or MEDIUMTEXT,
4427-
// not VARCHAR. These fields are used solely as item links, not as standard string fields.
4428-
if ($key !== 'completename' && is_string($value) && ($length = mb_strlen($value, 'UTF-8')) > 255) {
4429-
trigger_error(
4430-
"{$value} exceed 255 characters long ({$length}), it will be truncated.",
4431-
E_USER_WARNING
4432-
);
4433-
$this->input[$key] = mb_substr($value, 0, 255, 'UTF-8');
4434-
}
4435-
break;
4436-
44374422
default:
44384423
//Plugins can implement their own checks
44394424
if (!$this->checkSpecificValues($searchOption['datatype'], $value)) {

0 commit comments

Comments
 (0)