fix explode(): Argument #2 ($string) must be of type string, array given

This commit is contained in:
ralf 2023-02-06 20:38:14 +01:00
parent e4acb0eac1
commit c48e2dccf1

View File

@ -146,9 +146,11 @@ class Customfields extends Transformer
$customfields = $this->attrs['customfields'];
}
// Filter fields
$field_filters = $negate_fields = [];
if (!empty($this->attrs['fields']))
{
$fields_name = explode(',', $this->attrs['fields']);
$fields_name = is_array($this->attrs['fields']) ? $this->attrs['fields'] :
explode(',', $this->attrs['fields']);
foreach($fields_name as &$f)
{
if ($f[0] == "!")
@ -491,4 +493,4 @@ class Customfields extends Transformer
//error_log(__METHOD__."() $form_name $field: ".array2string($value).' --> '.array2string($value));
}
}
}
}