improve type handling of Avatar::generateAvatarFromSv
Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
parent
0a246be33f
commit
5bb0370994
|
@ -156,8 +156,9 @@ abstract class Avatar implements IAvatar {
|
|||
$avatar->readImageBlob($svg);
|
||||
$avatar->setImageFormat('png');
|
||||
$image = new OC_Image();
|
||||
$image->loadFromData($avatar);
|
||||
return $image->data();
|
||||
$image->loadFromData((string)$avatar);
|
||||
$data = $image->data();
|
||||
return $data === null ? false : $data;
|
||||
} catch (\Exception $e) {
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue