dev/core#1281 fix e-notice on isLiveMode
authoreileen <emcnaughton@wikimedia.org>
Mon, 7 Oct 2019 13:49:28 +0000 (15:49 +0200)
committereileen <emcnaughton@wikimedia.org>
Mon, 7 Oct 2019 13:49:28 +0000 (15:49 +0200)
Looks like a regression from https://github.com/civicrm/civicrm-core/commit/752cee47213094c29b8e6ae5d0b20f0800520d80
which hit in 5.15 - seems good to merge to rc / about to cut to rc

CRM/Contact/Form/Task/PDFLetterCommon.php

index c5b8439801d013d5d009addb698eb4c68b84190e..a0424e1d6cf7d82729dc6a03b1c0add185d32d57 100644 (file)
@@ -180,7 +180,7 @@ class CRM_Contact_Form_Task_PDFLetterCommon extends CRM_Core_Form_Task_PDFLetter
     }
 
     $tee = NULL;
-    if ($isLiveMode && Civi::settings()->get('recordGeneratedLetters') === 'combined-attached') {
+    if (self::isLiveMode($form) && Civi::settings()->get('recordGeneratedLetters') === 'combined-attached') {
       if (count($activityIds) !== 1) {
         throw new CRM_Core_Exception("When recordGeneratedLetters=combined-attached, there should only be one activity.");
       }