diff options
author | Simon L <szaimen@e.mail.de> | 2023-03-30 14:20:55 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-30 14:20:55 +0200 |
commit | 2811532e83a06534af408a3507bf8c79b6c10862 (patch) | |
tree | 883661a6fad95c9bc9e5b7a02e0afe5ad0c6878f /lib | |
parent | 5e7e3eb6659c34b9539efd6489167aad0c20430d (diff) | |
parent | 6a91d105b972535a3c56c3c3fa20a4bcb869a034 (diff) | |
download | nextcloud-server-2811532e83a06534af408a3507bf8c79b6c10862.tar.gz nextcloud-server-2811532e83a06534af408a3507bf8c79b6c10862.zip |
Merge pull request #37378 from nextcloud/enh/noid/fix-avatar-generation
fix the avatar generation on Alpine Linux
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/Avatar/Avatar.php | 5 |
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); |