Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Meurer <jonas@freesources.org>2022-02-02 13:57:17 +0300
committerJonas Meurer <jonas@freesources.org>2022-02-02 14:02:04 +0300
commit418473be4b3a15c5345768acb9cee43362ba3419 (patch)
tree6dfa2d8e760ec451fce35f54010d7aa2194c46cf
parent4ea9050328c76eb3ab71b1f6c59b3c194e077a0b (diff)
Fix preview generation for office documents
`new \imagick()` returns an object, but we need the image blob (binary string) from this object. This is a partial backport of #26531, which brings a lot of refactoring but also contains the fix. Fixes: #29956 Signed-off-by: Jonas Meurer <jonas@freesources.org>
-rw-r--r--lib/private/Preview/Office.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/Preview/Office.php b/lib/private/Preview/Office.php
index fef218823e2..50c016737ec 100644
--- a/lib/private/Preview/Office.php
+++ b/lib/private/Preview/Office.php
@@ -74,7 +74,7 @@ abstract class Office extends ProviderV2 {
}
$image = new \OC_Image();
- $image->loadFromData($png);
+ $image->loadFromData((string) $png);
$this->cleanTmpFiles();
unlink($pngPreview);