mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Fix Set a limit size on value for barcode generation
This commit is contained in:
parent
503b01334f
commit
a5e9551564
|
|
@ -116,6 +116,11 @@ if ($action == 'builddoc') {
|
|||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("BarcodeValue")), null, 'errors');
|
||||
$error++;
|
||||
}
|
||||
$MAXLENGTH = 51200; // Limit set to 50Ko
|
||||
if (dol_strlen($forbarcode) > $MAXLENGTH) { // barcode value
|
||||
setEventMessages($langs->trans("ErrorFieldTooLong", $langs->transnoentitiesnoconv("BarcodeValue")).' ('.$langs->trans("RequireXStringMax", $MAXLENGTH).')', null, 'errors');
|
||||
$error++;
|
||||
}
|
||||
if (empty($fk_barcode_type)) { // barcode type = barcode encoding
|
||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("BarcodeType")), null, 'errors');
|
||||
$error++;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user