Only Ignore Execptions thrown by the When package when its the UnitTests
[civicrm-core.git] / CRM / Core / BAO / RecurringEntity.php
index a74f8ca35e8ed5846db846d55aa8b2d1af50bfdb..e0275b469f6b7886aaa94ad22b0cd612d699a27f 100644 (file)
@@ -345,7 +345,9 @@ class CRM_Core_BAO_RecurringEntity extends CRM_Core_DAO_RecurringEntity {
 
       $count = 1;
       try {
-        $this->recursion->RFC5545_COMPLIANT = When::IGNORE;
+        if (CRM_Core_Config::singleton()->userFramework == 'UnitTests') {
+          $this->recursion->RFC5545_COMPLIANT = When::IGNORE;
+        }
         $this->recursion->generateOccurrences();
       }
       catch (Exception $e) {