mirror of
https://github.com/nextcloud/server.git
synced 2026-04-21 14:23:17 -04:00
fix: appease linters and psalm
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
This commit is contained in:
parent
68bb4a066c
commit
4b8a58cc49
1 changed files with 4 additions and 2 deletions
|
|
@ -157,8 +157,10 @@ class Manager implements IManager {
|
|||
for ($i = 0; $i < $task->getNumberOfImages(); $i++) {
|
||||
$file = $folder->newFile((string) $i);
|
||||
$files[] = $file;
|
||||
$resources[] = $file->write();
|
||||
if (!is_resource($resources[count($resources) - 1])) {
|
||||
$resource = $file->write();
|
||||
if ($resource !== false && $resource !== true && is_resource($resource)) {
|
||||
$resources[] = $resource;
|
||||
} else {
|
||||
throw new RuntimeException('Text2Image generation using provider "' . $provider->getName() . '" failed: Couldn\'t open file to write.');
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue