Cover the case where an event creator passes only one name part

This commit is contained in:
Marc Michalsky 2024-07-18 15:37:30 +02:00
parent 91c70c645a
commit 7415fac88d
Signed by untrusted user who does not match committer: marc.koch
GPG key ID: 12406554CFB028B9
2 changed files with 6 additions and 4 deletions

View file

@ -49,7 +49,7 @@ class CRM_TwingleCampaign_Utils_StringOperations {
$firstnames = implode(" ", $names);
return ['firstnames' => $firstnames, 'lastname' => $lastname];
}
return $string;
return ['display_name' => $string];
}
/**
@ -71,4 +71,4 @@ class CRM_TwingleCampaign_Utils_StringOperations {
public static function startsWith($haystack, $needle): bool {
return substr_compare($haystack, $needle, 0, strlen($needle)) === 0;
}
}
}