Provide default host value to hash() in Model\Item::guidFromUri

- Address part of https://github.com/friendica/friendica/issues/12011#issuecomment-1338133783
This commit is contained in:
Hypolite Petovan 2022-12-07 22:21:23 -05:00
commit fc246424a9
5 changed files with 14 additions and 9 deletions

View file

@ -125,7 +125,7 @@ class Avatar
private static function getFilename(string $url): string
{
$guid = Item::guidFromUri($url, parse_url($url, PHP_URL_HOST));
$guid = Item::guidFromUri($url);
return substr($guid, 0, 2) . '/' . substr($guid, 3, 2) . '/' . substr($guid, 5, 3) . '/' .
substr($guid, 9, 2) .'/' . substr($guid, 11, 2) . '/' . substr($guid, 13, 4). '/' . substr($guid, 18) . '-';