diff options
author | Richard Steinmetz <richard@steinmetz.cloud> | 2024-09-10 08:49:43 +0200 |
---|---|---|
committer | Richard Steinmetz <richard@steinmetz.cloud> | 2024-09-10 08:49:43 +0200 |
commit | bcf9f91893c9474e805dd34f0cc1ff4c13e126dc (patch) | |
tree | 96b2e88cb5770265ee6334f27abf3afc90444aac /lib | |
parent | 0f732199d22cf85d991f48389c33fb6e76b7eefc (diff) | |
download | nextcloud-server-bcf9f91893c9474e805dd34f0cc1ff4c13e126dc.tar.gz nextcloud-server-bcf9f91893c9474e805dd34f0cc1ff4c13e126dc.zip |
fix(preview): gracefully handle file not being opened in ProviderV2
Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
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 ca10aa67b36..7251dd70d17 100644 --- a/lib/private/Preview/ProviderV2.php +++ b/lib/private/Preview/ProviderV2.php @@ -71,6 +71,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); |