mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-01-02 23:22:32 +01:00
FIX error management when adding a property with type real
This commit is contained in:
@@ -63,11 +63,10 @@ function rebuildObjectClass($destdir, $module, $objectname, $newmask, $readdir =
|
||||
setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv("Label")), null, 'errors');
|
||||
return -2;
|
||||
}
|
||||
|
||||
if (! preg_match('/^(price|boolean|sellist|integer|date|timestamp|varchar|double|text|html)/', $addfieldentry['type']))
|
||||
|
||||
if (! preg_match('/^(price|sellist|date|varchar|double|text|html)/', $addfieldentry['type'])
|
||||
&& ! preg_match('/^(boolean|integer|real|timestamp)$/', $addfieldentry['type']))
|
||||
{
|
||||
setEventMessages($langs->trans('BadFormatForType', $objectname), null, 'errors');
|
||||
setEventMessages($langs->trans('BadValueForType', $objectname), null, 'errors');
|
||||
return -2;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user