Skip to content

Commit

Permalink
fix(TextToImage/Manager): Appease psalm
Browse files Browse the repository at this point in the history
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
  • Loading branch information
marcelklehr committed Oct 22, 2023
1 parent 71a06b6 commit fa2fa47
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/private/TextToImage/Manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ public function runTask(Task $task): void {
$file = $folder->newFile((string) $i);
$files[] = $file;
$resources[] = $file->write();
if ($resources[count($resources) - 1] === false) {
if (!is_resource($resources[count($resources) - 1])) {
throw new RuntimeException('Text2Image generation using provider "' . $provider->getName() . '" failed: Couldn\'t open file to write.');
}
}
Expand Down

0 comments on commit fa2fa47

Please sign in to comment.