summaryrefslogtreecommitdiffstats
path: root/lib/private/Avatar
diff options
context:
space:
mode:
authorSimon L <szaimen@e.mail.de>2023-03-23 23:37:46 +0100
committerSimon L <szaimen@e.mail.de>2023-03-29 12:42:58 +0200
commit6a91d105b972535a3c56c3c3fa20a4bcb869a034 (patch)
tree9696ed29aba14f5e518a34d6c22d346c099ae964 /lib/private/Avatar
parent553b5a51f6622f618f7776bdc38cd699f20ec686 (diff)
downloadnextcloud-server-6a91d105b972535a3c56c3c3fa20a4bcb869a034.tar.gz
nextcloud-server-6a91d105b972535a3c56c3c3fa20a4bcb869a034.zip
another approach to fixing the avatar generation
Signed-off-by: Simon L <szaimen@e.mail.de>
Diffstat (limited to 'lib/private/Avatar')
-rw-r--r--lib/private/Avatar/Avatar.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/private/Avatar/Avatar.php b/lib/private/Avatar/Avatar.php
index 9b9220936eb..69bf9bacfcf 100644
--- a/lib/private/Avatar/Avatar.php
+++ b/lib/private/Avatar/Avatar.php
@@ -129,6 +129,11 @@ abstract class Avatar implements IAvatar {
if (!extension_loaded('imagick')) {
return null;
}
+ $formats = Imagick::queryFormats();
+ // Avatar generation breaks if RSVG format is enabled. Fall back to gd in that case
+ if (in_array("RSVG", $formats, true)) {
+ return null;
+ }
try {
$font = __DIR__ . '/../../../core/fonts/NotoSans-Regular.ttf';
$svg = $this->getAvatarVector($size, $darkTheme);