From cb991f12433f323a3c0fe9a5d0b00a72919db779 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Fri, 8 Oct 2021 14:10:45 +0200 Subject: [PATCH] fix Api\Accounts::username(): Argument #1 ($account_id) must be of type ?int, string given --- api/src/Storage/Customfields.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/src/Storage/Customfields.php b/api/src/Storage/Customfields.php index 82d3b61d9f..fafa460512 100755 --- a/api/src/Storage/Customfields.php +++ b/api/src/Storage/Customfields.php @@ -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); }