Fix null pointer

This commit is contained in:
James Cole 2022-06-02 05:49:49 +02:00
parent f83ab0a7dc
commit 805d3ec975
No known key found for this signature in database
GPG Key ID: B49A324B7EAD6D80

View File

@ -827,7 +827,7 @@ class GroupCollector implements GroupCollectorInterface
private function convertToStrings(array $array): array
{
foreach ($this->stringFields as $field) {
$array[$field] = array_key_exists($field, $array) ? (string) $array[$field] : '0';
$array[$field] = array_key_exists($field, $array) && null !== $array[$field] ? (string) $array[$field] : null;
}
return $array;