I might have to wait a year to find out if this fixes it, but I made these changes to classes/tasks/SubscriptionExpiryReminder.inc.php – they make sense to me but there may be some deeper reason. Changes marked with “//##”:
// If it is the first day of a month but previous month had only
// 30 days then simulate 31st day for expiry dates that end on
// that day.
//##
//$shortMonths = array(2,4,6,8,10,12);
$shortMonths = array(2,4,6,9,11);
if (($todayDate['day'] == 1) && in_array(($todayDate['month'] - 1), $shortMonths)) {
$curDate['day'] = 31;
$curDate['month'] = $todayDate['month'] - 1;
//##
if ($curDate['month'] == 0) $curDate['month'] = 12;
if ($curDate['month'] == 12) {
$curDate['year'] = $todayDate['year'] - 1;
} else {
$curDate['year'] = $todayDate['year'];
}
$journals = $journalDao->getAll(true);
while ($journal = $journals->next()) {
// Send reminders for simulated 31st day of short month
$this->sendJournalReminders($journal, $curDate);
}
}