Fix php8
This commit is contained in:
parent
3ae9b07fee
commit
884ac621de
1 changed files with 9 additions and 7 deletions
|
|
@ -9738,14 +9738,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'];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue