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.