mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-07 16:41:48 +01:00
Merge branch '16.0' of git@github.com:Dolibarr/dolibarr.git into 17.0
This commit is contained in:
@@ -9899,14 +9899,16 @@ abstract class CommonObject
|
||||
}
|
||||
|
||||
// Force values to default values when known
|
||||
foreach ($this->fields as $key => $value) {
|
||||
// If fields are already set, do nothing
|
||||
if (array_key_exists($key, $fields)) {
|
||||
continue;
|
||||
}
|
||||
if (property_exists($this, 'fields')) {
|
||||
foreach ($this->fields as $key => $value) {
|
||||
// If fields are already set, do nothing
|
||||
if (array_key_exists($key, $fields)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!empty($value['default'])) {
|
||||
$this->$key = $value['default'];
|
||||
if (!empty($value['default'])) {
|
||||
$this->$key = $value['default'];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user