fix: repair the date of birth import in Teamer::fromUserinfo
This commit is contained in:
@@ -250,11 +250,11 @@ class Teamer implements TimestampableEntityInterface, SoftDeletableEntityInterfa
|
|||||||
->setGender($userinfo['profile']['gender'] ?? null)
|
->setGender($userinfo['profile']['gender'] ?? null)
|
||||||
;
|
;
|
||||||
|
|
||||||
if (null !== $userinfo['profile']['date_of_birth'] ?? null) {
|
if (true === isset($userinfo['profile']['date_of_birth'])) {
|
||||||
try {
|
try {
|
||||||
$dateOfBirth = new \DateTimeImmutable(['profile']['date_of_birth']);
|
$dateOfBirth = new \DateTimeImmutable((string) $userinfo['profile']['date_of_birth']);
|
||||||
$instance->setDateOfBirth($dateOfBirth);
|
$instance->setDateOfBirth($dateOfBirth);
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception|\TypeError $e) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user