Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Minor
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.6.11
-
Fix Version/s: 4.7.4
-
Component/s: None
-
Labels:
-
Documentation Required?:None
-
Funding Source:Core Team Funds
Description
DateTime::modify(): Failed to parse time string (-day) at position 0 [warning] (-): Unexpected character Pledge.php:979
if (empty($details['reminder_date'])) { $nextReminderDate = new DateTime($details['scheduled_date']); $nextReminderDate->modify("-" . $details['initial_reminder_day'] . "day"); // line 979 $nextReminderDate = $nextReminderDate->format("Ymd"); }
When Pledge > Payment Reminders > Send Initial Reminder (currently an optional field) is not set, the above block of code will generate a warning, because it is trying to perform the operation "-day" instead of say, "-2 day" or "-0 day".
Suggestion that we should not be processing reminder dates if these Payment Reminders are not set in the database. Or at the very least, perform this type of check:
if(!isset($details['initial_reminder_day'])
$details['initial_reminder_day'] = 0;