diff options
author | John Molakvoæ <skjnldsv@users.noreply.github.com> | 2024-09-15 22:55:11 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-15 22:55:11 +0200 |
commit | e60dd69fda660fc99c448d93b6ea1a29bbf80dc9 (patch) | |
tree | 487805ce3f09791f5e89a4c05cd449a87966f07c /lib | |
parent | 95c3012ca9a47ac9110b6d5273f85e880dde119d (diff) | |
parent | 51b42ef3460e16a679f57c2e82a1bc1451ba32e3 (diff) | |
download | nextcloud-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.php | 3 |
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); |