fix Api\Accounts::username(): Argument #1 ($account_id) must be of type ?int, string given

This commit is contained in:
Ralf Becker 2021-10-08 14:10:45 +02:00
parent e1997befe9
commit 867c000d99

View File

@ -190,7 +190,7 @@ class Customfields implements \IteratorAggregate
/**
* Format a single custom field value as string
*
* @param array $field field defintion incl. type
* @param array $field field definition incl. type
* @param string $value field value
* @return string formatted value
*/
@ -204,7 +204,7 @@ class Customfields implements \IteratorAggregate
$values = array();
foreach($field['rows'] > 1 ? explode(',', $value) : (array) $value as $value)
{
$values[] = Api\Accounts::username($value);
$values[] = is_numeric($value) ? Api\Accounts::username($value) : $value;
}
$value = implode(', ',$values);
}