Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-15770

if $dateString is 'null' make no attempt to format it

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Trivial
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.4.11
    • Fix Version/s: 4.6
    • Component/s: Core CiviCRM
    • Labels:
      None
    • Documentation Required?:
      None

      Description

      Membership Receipt for LifeTime Membership - Send Confirmation and Receipts -> from Backend shows:

      Membership End Date 0th, 0

      Two options:

      1) Don't try format if $membership->end_date is 'null'

      in CRM_Member_Form_Membership:
      if ($membership->end_date !='null')

      { $form->assign('mem_end_date', CRM_Utils_Date::customFormat($membership->end_date, '%B %E%f, %Y')); }

      2) Never try to format any $dateString that is 'null':

      in CRM_Utils_Date:
      if ($dateString == 'null')

      { return ''; }

        Attachments

          Activity

            People

            • Assignee:
              pratiksha pratiksha
              Reporter:
              KarinG KarinG
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: