Fix html2pdf default PDF format when multiple pdf_format are available.
authorMathieu Lutfy <mathieu@bidon.ca>
Tue, 5 Feb 2019 17:32:23 +0000 (12:32 -0500)
committerMathieu Lutfy <mathieu@bidon.ca>
Tue, 5 Feb 2019 17:32:23 +0000 (12:32 -0500)
CRM/Utils/PDF/Utils.php

index 1a7d449621d27740eaad98bfbbab5e33ab35b076..61e5ee781f97888aced6ad0805a07762b1b5d114 100644 (file)
@@ -61,7 +61,7 @@ class CRM_Utils_PDF_Utils {
       // PDF Page Format parameters passed in
       $format = array_merge($format, $pdfFormat);
     }
-    else {
+    elseif (!empty($pdfFormat)) {
       // PDF Page Format ID passed in
       $format = CRM_Core_BAO_PdfFormat::getById($pdfFormat);
     }