----------------------------------------
* CRM-15770: if $dateString is 'null' make no attempt to format it
https://issues.civicrm.org/jira/browse/CRM-15770
if (empty($lineItem)) {
$form->assign('mem_start_date', CRM_Utils_Date::customFormat($membership->start_date, '%B %E%f, %Y'));
- $form->assign('mem_end_date', CRM_Utils_Date::customFormat($membership->end_date, '%B %E%f, %Y'));
+ if (!CRM_Utils_System::isNull($membership->end_date)) {
+ $form->assign('mem_end_date', CRM_Utils_Date::customFormat($membership->end_date, '%B %E%f, %Y'));
+ }
$form->assign('membership_name', CRM_Member_PseudoConstant::membershipType($membership->membership_type_id));
}
}
}
- if ($dateString) {
+ if (!CRM_Utils_System::isNull($dateString)) {
if (strpos($dateString, '-')) {
$year = (int) substr($dateString, 0, 4);
$month = (int) substr($dateString, 5, 2);