Skip to content

Commit

Permalink
Merge pull request #24007 from demeritcowboy/pdf-error
Browse files Browse the repository at this point in the history
Fix test. Don't hide errors. (Followup to 23999)
  • Loading branch information
seamuslee001 authored Jul 18, 2022
2 parents b04fd95 + 374e164 commit 11302a9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions 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 @@ -505,7 +505,7 @@ public function formatMessage(&$message) {
],
];

$htmlMsg = preg_split($newLineOperators['p']['pattern'], ($message ?? ''));
$htmlMsg = preg_split($newLineOperators['p']['pattern'], $message);
foreach ($htmlMsg as $k => & $m) {
$messages = preg_split($newLineOperators['br']['pattern'], $m);
foreach ($messages as $key => & $msg) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ public function testFilenameIsAssigned(?string $pdfFileName, ?string $activitySu
$form = $this->getPDFForm([
'pdf_file_name' => $pdfFileName,
'subject' => $activitySubject,
'html_message' => '<p></p>',
], [$this->contactId], $isLiveMode);
$fileNameAssigned = $this->submitForm($form)['fileName'];
$this->assertEquals($expectedFilename, $fileNameAssigned);
Expand Down

0 comments on commit 11302a9

Please sign in to comment.