Skip to content

Commit

Permalink
fix dowload XMLConverter
Browse files Browse the repository at this point in the history
nyamsprod committed Jan 27, 2025
1 parent 8b8a2bd commit 6e8337d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/XMLConverter.php
Original file line number Diff line number Diff line change
@@ -95,7 +95,10 @@ public function download(iterable $records, ?string $filename = null, string $en
HttpHeaders::forFileDownload($filename, 'application/xml; charset='.strtolower($encoding));
}

$document->formatOutput = $formatOutput;
if ($document instanceof DOMDocument) {
$document->encoding = strtoupper($encoding);

return $document->save('php://output');
}

0 comments on commit 6e8337d

Please sign in to comment.