Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Major
-
Resolution: Fixed/Completed
-
Affects Version/s: 3.1.3
-
Fix Version/s: 3.1.5
-
Component/s: CiviPledge
-
Labels:None
Description
The function getContactPledges() in CRM/Pledge/BAO/Pledge.php retrueves a list of 'contribution_status' by 'label' instead of 'name'! This way the retrieved values are localized and do not match the english constants in the function.
If I try to change a membership payment I get the following SQL error:
Array
(
[callback] => Array
(
[0] => CRM_Core_Error
[1] => handle
)
[code] => -2
[message] => DB Error: syntax error
[mode] => 16
[debug_info] =>
SELECT civicrm_pledge.id id
FROM civicrm_pledge
WHERE civicrm_pledge.status_id IN (,,)
AND civicrm_pledge.contact_id = 2
[nativecode=1064 ** You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ',)
AND civicrm_pledge.contact_id = 2' at line 3]
[type] => DB_Error
Attached is a patch for this bug.
Cheers
Matthias