diff options
author | Simon L <szaimen@e.mail.de> | 2023-03-31 09:07:22 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-31 09:07:22 +0200 |
commit | d5360c86b29d1d6112bf2bee4adef98b44f85c29 (patch) | |
tree | b94b923cd6114decc4b60f55529ee30a222e46e9 /lib | |
parent | 70a713b8c427ba0a69c78379bd6bf7343f583784 (diff) | |
parent | 95b3b5dcc2d8f95a28b4f81d2914962cd1cb841c (diff) | |
download | nextcloud-server-d5360c86b29d1d6112bf2bee4adef98b44f85c29.tar.gz nextcloud-server-d5360c86b29d1d6112bf2bee4adef98b44f85c29.zip |
Merge pull request #37482 from nextcloud/backport/37378/stable26
[stable26] 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); |