Skip to content

Commit

Permalink
Don't pass invalid streams to Imaginary
Browse files Browse the repository at this point in the history
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>

Update Imaginary.php

Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>

Update Imaginary.php

Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
  • Loading branch information
solracsf authored and backportbot-nextcloud[bot] committed Oct 29, 2023
1 parent 26d35d9 commit c05de67
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/private/Preview/Imaginary.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ public function getCroppedThumbnail(File $file, int $maxX, int $maxY, bool $crop

// Object store
$stream = $file->fopen('r');
if (!$stream || !is_resource($stream) || feof($stream)) {
return null;
}

$httpClient = $this->service->newClient();

Expand Down

0 comments on commit c05de67

Please sign in to comment.