Skip to content
Snippets Groups Projects
Commit c5a13592 authored by Yassine Doghri's avatar Yassine Doghri
Browse files

fix: remove path key when getting default avatar path

parent dfae166e
No related branches found
No related tags found
No related merge requests found
......@@ -366,7 +366,7 @@ if (! function_exists('get_avatar_url')) {
function get_avatar_url(Person $person, string $size): string
{
if ($person->avatar === null) {
$defaultAvatar = config('Images')
$defaultAvatarPath = config('Images')
->avatarDefaultPath;
$sizes = config('Images')
......@@ -376,10 +376,8 @@ if (! function_exists('get_avatar_url')) {
helper('filesystem');
// return default site icon url
return base_url(
change_file_path($defaultAvatar['path'], '_' . $size, $sizeConfig['extension'] ?? null)
);
// return default avatar url
return base_url(change_file_path($defaultAvatarPath, '_' . $size, $sizeConfig['extension'] ?? null));
}
$sizeKey = $size . '_url';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment