Merge pull request #23715 from grandoc/new_branch_28_01_2023

better comment
This commit is contained in:
Laurent Destailleur 2023-01-29 20:41:49 +01:00 committed by GitHub
commit 5d0591aabc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1279,7 +1279,7 @@ abstract class CommonDocGenerator
$extrafieldOptionsKey = $extrafieldsKeyPrefix.$extrafieldKey;
// Load extrafiels if not allready does
// Load extra fields if they haven't been loaded already.
if (empty($this->extrafieldsCache)) {
$this->extrafieldsCache = new ExtraFields($this->db);
}
@ -1605,7 +1605,7 @@ abstract class CommonDocGenerator
return 0;
}
// Load extrafiels if not allready does
// Load extra fields if they haven't been loaded already.
if (empty($this->extrafieldsCache)) {
$this->extrafieldsCache = new ExtraFields($this->db);
}
@ -1615,7 +1615,7 @@ abstract class CommonDocGenerator
$extrafields = $this->extrafieldsCache;
if (!empty($extrafields->attributes[$object->table_element]) && is_array($extrafields->attributes[$object->table_element]['label'])) {
if (!empty($extrafields->attributes[$object->table_element]) && is_array($extrafields->attributes[$object->table_element]) && array_key_exists('label', $extrafields->attributes[$object->table_element]) && is_array($extrafields->attributes[$object->table_element]['label'])) {
foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $label) {
// Dont display separator yet even is set to be displayed (not compatible yet)
if ($extrafields->attributes[$object->table_element]['type'][$key] == 'separate') {