Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-6937 Standardize date params in API
  3. CRM-6936

Inconsistent use of setting date in civicrm_note_create()

    Details

    • Type: Sub-task
    • Status: Done/Fixed
    • Priority: Minor
    • Resolution: Fixed/Completed
    • Affects Version/s: 3.2.3
    • Fix Version/s: Unscheduled
    • Component/s: CiviCRM API
    • Labels:
      None
    • Documentation Required?:
      None
    • Funding Source:
      Contributed Code

      Description

      Setting the modified date as array('d' => '01', 'M' => '01', 'Y' => '1970'), fails to properly set the date in civicrm_note_create(). This syntax is supported in other API calls such as civicrm_relationship_create() with $start_date and $end_date. Instead, civicrm_note_create() requires "Ymd" as a string.

      When using the array('d' => '01', 'M' => '01', 'Y' => '1970') syntax in the $params, the date is silently set to 0 instead of:
      a) reading the m/d/y from the array or
      b) returning an error

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              dharmatech Dharmatech
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: