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

civicrm_contribution_get returns type name instead of ID

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: 3.1.5
    • Fix Version/s: 4.3.0
    • Component/s: CiviCRM API
    • Labels:
      None

      Description

      Code like this:

      $params = array('contribution_id' => $contributionID);
      require_once('api/v2/Contribute.php');
      $contribution = civicrm_contribution_get($params);
      echo $contribution['contribution_status_id'];

      ...will echo the String name for the contribution status, not the ID as the key suggests. Besides being unintuitive, this means that following the above with civicrm_contribution_add($contribution) will fail.

        Attachments

          Activity

            People

            • Assignee:
              kurund Kurund Jalmi
              Reporter:
              mchapman2000 Matt Chapman
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: