CRM-18103 - Warning in Pledge.php caused by null initial_reminder_day
authorjitendrapurohit <jitendra.purohit@webaccessglobal.com>
Mon, 14 Mar 2016 06:39:58 +0000 (12:09 +0530)
committerjitendrapurohit <jitendra.purohit@webaccessglobal.com>
Mon, 14 Mar 2016 06:39:58 +0000 (12:09 +0530)
CRM/Pledge/BAO/Pledge.php

index b6835b238568690d4e41d1b46b41b12a014c9baa..7b5137e7ba54a279034b99b3ca92df25c9434d1c 100644 (file)
@@ -1013,11 +1013,13 @@ SELECT  pledge.contact_id              as contact_id,
 
         if (empty($details['reminder_date'])) {
           $nextReminderDate = new DateTime($details['scheduled_date']);
+          $details['initial_reminder_day'] = empty($details['initial_reminder_day']) ? 0 : $details['initial_reminder_day'];
           $nextReminderDate->modify("-" . $details['initial_reminder_day'] . "day");
           $nextReminderDate = $nextReminderDate->format("Ymd");
         }
         else {
           $nextReminderDate = new DateTime($details['reminder_date']);
+          $details['additional_reminder_day'] = empty($details['additional_reminder_day']) ? 0 : $details['additional_reminder_day'];
           $nextReminderDate->modify("+" . $details['additional_reminder_day'] . "day");
           $nextReminderDate = $nextReminderDate->format("Ymd");
         }