Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Major
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.1.1
-
Fix Version/s: 4.2.0
-
Component/s: CiviCRM API
-
Labels:None
Description
Having a contribution type starting with a lower case letter, CRM_Contribute_PseudoConstant::contributionType () returns all contribution types with lowercase letters. However, the API checks the contributiontype with an "ucfirst ( $value )" (line 320 of api/v3/Contribution.php):
$contributionTypeId = CRM_Utils_Array::key ( ucfirst ( $value ), CRM_Contribute_PseudoConstant::contributionType () );
This results in a NULL, and any contribution updates will fail with "Invalid Contribution Type".
Eigther, ucfirst should be removed, or all contribution types should be converted to ucfirst, too.