Merge pull request #16677 from frederic34/patch-31

fix php8 warning
This commit is contained in:
Laurent Destailleur 2021-03-15 10:55:01 +01:00 committed by GitHub
commit e7205a4f79
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -14,7 +14,7 @@ if (empty($extrafieldsobjectkey) && is_object($object)) {
// Loop to show all columns of extrafields from $obj, $extrafields and $db
if (!empty($extrafieldsobjectkey)) { // $extrafieldsobject is the $object->table_element like 'societe', 'socpeople', ...
if (is_array($extrafields->attributes[$extrafieldsobjectkey]['label']) && count($extrafields->attributes[$extrafieldsobjectkey]['label']) > 0) {
if (isset($extrafields->attributes[$extrafieldsobjectkey]['label']) && is_array($extrafields->attributes[$extrafieldsobjectkey]['label']) && count($extrafields->attributes[$extrafieldsobjectkey]['label']) > 0) {
if (empty($extrafieldsobjectprefix)) {
$extrafieldsobjectprefix = 'ef.';
}