Skip to content

Commit

Permalink
#1799: Added error reporting disable for mpdf
Browse files Browse the repository at this point in the history
  • Loading branch information
eadesignro committed Oct 30, 2017
1 parent 89bbb27 commit 0c5a1bf
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Helper/Pdf.php
Original file line number Diff line number Diff line change
Expand Up @@ -229,8 +229,10 @@ public function _eaPDFSettings($parts)

$templateModel = $this->template;

if (!$templateModel->getTemplateCustomForm()) {
$oldErrorReporting = error_reporting();
error_reporting(0);

if (!$templateModel->getTemplateCustomForm()) {
/** @var mPDF $pdf */
//@codingStandardsIgnoreLine
$pdf = new Mpdf($this->config($templateModel));
Expand All @@ -250,6 +252,8 @@ public function _eaPDFSettings($parts)
$pdf->WriteHTML('<body>' . html_entity_decode($parts['body']) . '</body>');
$pdfToOutput = $pdf->Output('', 'S');

error_reporting($oldErrorReporting);

return $pdfToOutput;
}

Expand Down

0 comments on commit 0c5a1bf

Please sign in to comment.