* @return array
* @throws \Exception
*/
- public static function createPhotoForExternalResource($url, $uid, $mimetype = "image/jpeg")
+ public static function createPhotoForExternalResource($url, $uid = 0, $mimetype = "image/jpeg")
{
$fields = self::getFields();
$values = array_fill(0, count($fields), "");
} else {
$url = Contact::getDefaultAvatar($contact, Proxy::SIZE_SMALL);
}
- return MPhoto::createPhotoForExternalResource($url, 0);
+ return MPhoto::createPhotoForExternalResource($url);
case "header":
$contact = Contact::getById($uid, ['uid', 'url', 'header']);
if (empty($contact)) {
} else {
$url = DI::baseUrl() . '/images/blank.png';
}
- return MPhoto::createPhotoForExternalResource($url, 0);
+ return MPhoto::createPhotoForExternalResource($url);
case "profile":
case "custom":
$scale = 4;
$parts = parse_url($default);
if (!empty($parts['scheme']) || !empty($parts['host'])) {
- $photo = MPhoto::createPhotoForExternalResource($default, 0);
+ $photo = MPhoto::createPhotoForExternalResource($default);
} else {
$photo = MPhoto::createPhotoForSystemResource($default);
}