CRM-16700 - Fix notice on Print PDF Letters from search task.
authorDave Greenberg <dave@civicrm.org>
Wed, 17 Jun 2015 18:13:30 +0000 (11:13 -0700)
committerDave Greenberg <dave@civicrm.org>
Wed, 17 Jun 2015 18:13:30 +0000 (11:13 -0700)
----------------------------------------
* CRM-16700: Notice pdfformat when creating pdf letters
  https://issues.civicrm.org/jira/browse/CRM-16700

CRM/Core/BAO/PdfFormat.php

index 6778b5fa93c58077cd60df30088e809ec5f45273..23e548ad18bb29fe6e41e045f4d51fb2bf63e957 100644 (file)
@@ -306,7 +306,7 @@ class CRM_Core_BAO_PdfFormat extends CRM_Core_DAO_OptionValue {
       foreach (self::$optionValueFields as $name => $field) {
         if (!isset($values[$name])) {
           $values[$name] = $field['default'];
-          if ($field['metric']) {
+          if (isset($field['metric']) && $field['metric']) {
             $values[$name] = CRM_Utils_PDF_Utils::convertMetric($field['default'],
               self::$optionValueFields['metric']['default'],
               $values['metric'], 3