Skip to content

Commit

Permalink
Merge pull request #22532 from seamuslee001/dev_core_3034
Browse files Browse the repository at this point in the history
dev/core#3034 Ensure that filename contains the file extension for PDFs
  • Loading branch information
demeritcowboy authored Mar 28, 2022
2 parents 8aebbe5 + a4ef79e commit 631addc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CRM/Contact/Form/Task/PDFTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ public function postProcess(): void {
$fileName = $this->getFileName();

if ($type === 'pdf') {
CRM_Utils_PDF_Utils::html2pdf($html, $fileName, FALSE, $formValues);
CRM_Utils_PDF_Utils::html2pdf($html, $fileName . '.pdf', FALSE, $formValues);
}
elseif (!empty($formValues['document_file_path'])) {
$fileName = pathinfo($formValues['document_file_path'], PATHINFO_FILENAME) . '.' . $type;
Expand Down

0 comments on commit 631addc

Please sign in to comment.