Skip to content

Commit 18709ba

Browse files
Merge pull request #8508 from Sesquipedalian/3.0/avatar_url_null
2 parents c550ba4 + 33da671 commit 18709ba

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Sources/User.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2872,7 +2872,7 @@ public static function setAvatarData(array $data = []): array
28722872
// Look if the user has a gravatar field or has set an external url as avatar.
28732873
else {
28742874
if (!$data['avatar'] instanceof Url) {
2875-
$data['avatar'] = new Url($data['avatar']);
2875+
$data['avatar'] = new Url((string) $data['avatar']);
28762876
}
28772877

28782878
// So it's stored in the member table?
@@ -2890,7 +2890,7 @@ public static function setAvatarData(array $data = []): array
28902890
if ($data['avatar'] instanceof Url) {
28912891
$url = $data['avatar'];
28922892
} else {
2893-
$url = new Url($data['avatar']);
2893+
$url = new Url((string) $data['avatar']);
28942894
}
28952895

28962896
$image = isset($url->scheme) ? $url->proxied() : Config::$modSettings['avatar_url'] . '/' . $data['avatar'];

0 commit comments

Comments
 (0)