Skip to content

Commit f0a3948

Browse files
committed
S2FRMS-40 - handling children with empty name
1 parent c7b8a8b commit f0a3948

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Plugin/os2web/DataLookup/ServiceplatformenCPRExtended.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ public function lookup($cpr, $fetchChildren = TRUE, $allowCprTestModeReplace = T
209209
$childCprResult = $this->lookup($relationshipChild->personnummer, FALSE, FALSE);
210210

211211
if ($childCprResult->isSuccessful() && $childCprResult->hasGuardian($cpr)) {
212-
$child['name'] = $childCprResult->getName() ?? $childCprResult->getCpr();
212+
$child['name'] = !empty($childCprResult->getName()) ? $childCprResult->getName() : $childCprResult->getCpr();
213213

214214
$child = [
215215
'cpr' => $relationshipChild->personnummer,

0 commit comments

Comments
 (0)