mirror of
https://github.com/humhub/humhub.git
synced 2025-01-17 14:18:27 +01:00
Fix null param value on PHP 8.1 (#6000)
This commit is contained in:
parent
2e3e3d92ba
commit
13ab5a3dab
@ -176,7 +176,7 @@ class Birthday extends BaseType
|
||||
public function getUserValue(User $user, $raw = true): ?string
|
||||
{
|
||||
$internalName = $this->profileField->internal_name;
|
||||
$birthdayDate = \DateTime::createFromFormat('Y-m-d', $user->profile->$internalName,
|
||||
$birthdayDate = \DateTime::createFromFormat('Y-m-d', $user->profile->$internalName ?? '',
|
||||
new \DateTimeZone(Yii::$app->formatter->timeZone));
|
||||
|
||||
$internalNameHideAge = $this->profileField->internal_name . '_hide_year';
|
||||
|
Loading…
x
Reference in New Issue
Block a user