Merge pull request #24149 from ATM-Consulting/FIX_17.0_invalid_argument_log
FIX 17.0 PHP Warning invalid argument supplied for foreach
This commit is contained in:
commit
fdfd87cd11
@ -6090,13 +6090,15 @@ abstract class CommonObject
|
|||||||
|
|
||||||
// If field is a computed field, value must become result of compute (regardless of whether a row exists
|
// If field is a computed field, value must become result of compute (regardless of whether a row exists
|
||||||
// in the element's extrafields table)
|
// in the element's extrafields table)
|
||||||
foreach ($extrafields->attributes[$this->table_element]['label'] as $key => $val) {
|
if (is_array($extrafields->attributes[$this->table_element]['label'])){
|
||||||
if (!empty($extrafields->attributes[$this->table_element]) && !empty($extrafields->attributes[$this->table_element]['computed'][$key])) {
|
foreach ($extrafields->attributes[$this->table_element]['label'] as $key => $val) {
|
||||||
//var_dump($conf->disable_compute);
|
if (!empty($extrafields->attributes[$this->table_element]) && !empty($extrafields->attributes[$this->table_element]['computed'][$key])) {
|
||||||
if (empty($conf->disable_compute)) {
|
//var_dump($conf->disable_compute);
|
||||||
global $objectoffield; // We set a global variable to $objectoffield so
|
if (empty($conf->disable_compute)) {
|
||||||
$objectoffield = $this; // we can use it inside computed formula
|
global $objectoffield; // We set a global variable to $objectoffield so
|
||||||
$this->array_options["options_".$key] = dol_eval($extrafields->attributes[$this->table_element]['computed'][$key], 1, 0, '');
|
$objectoffield = $this; // we can use it inside computed formula
|
||||||
|
$this->array_options['options_' . $key] = dol_eval($extrafields->attributes[$this->table_element]['computed'][$key], 1, 0, '');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user