Fix error when generating documents

This commit is contained in:
Laurent Destailleur 2020-02-29 00:13:42 +01:00
parent c6b6b97ac0
commit e35bba358f

View File

@ -788,6 +788,8 @@ abstract class CommonDocGenerator
{ {
// phpcs:enable // phpcs:enable
global $conf; global $conf;
if (is_array($extrafields->attributes[$object->table_element]['label'])) {
foreach($extrafields->attributes[$object->table_element]['label'] as $key=>$label) foreach($extrafields->attributes[$object->table_element]['label'] as $key=>$label)
{ {
if($extrafields->attributes[$object->table_element]['type'][$key] == 'price') if($extrafields->attributes[$object->table_element]['type'][$key] == 'price')
@ -864,6 +866,7 @@ abstract class CommonDocGenerator
$array_to_fill = array_merge($array_to_fill, array($array_key.'_options_'.$key => $object->array_options['options_'.$key])); $array_to_fill = array_merge($array_to_fill, array($array_key.'_options_'.$key => $object->array_options['options_'.$key]));
} }
}
return $array_to_fill; return $array_to_fill;
} }