mirror of
https://github.com/nextcloud/server.git
synced 2026-03-18 08:34:10 -04:00
Merge pull request #47867 from nextcloud/backport/47858/stable29
[stable29] fix(preview): gracefully handle file not being opened in ProviderV2
This commit is contained in:
commit
e60dd69fda
1 changed files with 3 additions and 0 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue