]> source.dussan.org Git - nextcloud-server.git/commitdiff
another approach to fixing the avatar generation 37482/head
authorSimon L <szaimen@e.mail.de>
Thu, 23 Mar 2023 22:37:46 +0000 (23:37 +0100)
committerbackportbot-nextcloud[bot] <backportbot-nextcloud[bot]@users.noreply.github.com>
Thu, 30 Mar 2023 12:31:43 +0000 (12:31 +0000)
Signed-off-by: Simon L <szaimen@e.mail.de>
lib/private/Avatar/Avatar.php

index 9b9220936eb027799731d1e7a56a36caaa2d0474..69bf9bacfcf3e5dc4a7de6dcc6a6434270d5e586 100644 (file)
@@ -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);