Skip to content

Commit

Permalink
fix: prevent error when is empty files
Browse files Browse the repository at this point in the history
Signed-off-by: Vitor Mattos <[email protected]>
  • Loading branch information
vitormattos committed Jan 16, 2025
1 parent a3f2eca commit da1bad1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/Migration/Version11000Date20250114182030.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,14 @@ public function postSchemaChange(IOutput $output, Closure $schemaClosure, array
)
->orderBy('lim.id');
$result = $qb1->executeQuery();
$identifyMethods = [];
$row = $result->fetch();
if (!$row) {
return;
}
$folder = $this->appData->getFolder('/');
$file = $folder->newFile('backup-table-libresign_identify_method.csv');
$maxId = 0;
$fp = $file->write();
$row = $result->fetch();
$identifyMethods[] = $row;
fputcsv($fp, array_keys($row));
fputcsv($fp, $row);
Expand Down

0 comments on commit da1bad1

Please sign in to comment.