aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJohn Molakvoæ <skjnldsv@users.noreply.github.com>2024-09-15 22:55:11 +0200
committerGitHub <noreply@github.com>2024-09-15 22:55:11 +0200
commite60dd69fda660fc99c448d93b6ea1a29bbf80dc9 (patch)
tree487805ce3f09791f5e89a4c05cd449a87966f07c /lib
parent95c3012ca9a47ac9110b6d5273f85e880dde119d (diff)
parent51b42ef3460e16a679f57c2e82a1bc1451ba32e3 (diff)
downloadnextcloud-server-e60dd69fda660fc99c448d93b6ea1a29bbf80dc9.tar.gz
nextcloud-server-e60dd69fda660fc99c448d93b6ea1a29bbf80dc9.zip
Merge pull request #47867 from nextcloud/backport/47858/stable29
[stable29] fix(preview): gracefully handle file not being opened in ProviderV2
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Preview/ProviderV2.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/private/Preview/ProviderV2.php b/lib/private/Preview/ProviderV2.php
index 6d80594d1c8..7a5dfabc59c 100644
--- a/lib/private/Preview/ProviderV2.php
+++ b/lib/private/Preview/ProviderV2.php
@@ -88,6 +88,9 @@ abstract class ProviderV2 implements IProviderV2 {
$absPath = \OC::$server->getTempManager()->getTemporaryFile();
$content = $file->fopen('r');
+ if ($content === false) {
+ return false;
+ }
if ($maxSize) {
$content = stream_get_contents($content, $maxSize);