FIX: Undefined array key default on fields (#29243)

This commit is contained in:
atm-irvine 2024-04-06 13:30:28 +02:00 committed by GitHub
parent cc112faf0f
commit 660bb7bd5c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -274,7 +274,7 @@ if ($action == 'update' && !empty($permissiontoadd)) {
}
$object->$key = $value;
if ($val['notnull'] > 0 && $object->$key == '' && is_null($val['default'])) {
if ($val['notnull'] > 0 && $object->$key == '' && (!isset($val['default']) || is_null($val['default']))) {
$error++;
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv($val['label'])), null, 'errors');
}