From: Pradeep Nayak Date: Mon, 3 Nov 2014 05:28:03 +0000 (+0530) Subject: -- CRM-15475, Used Contribution status Pseudoconstant to fetch id rather then using... X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=3ac2136c87adc68fca932f0cea3f599a8f517607;p=civicrm-core.git -- CRM-15475, Used Contribution status Pseudoconstant to fetch id rather then using getfield value function ---------------------------------------- * CRM-15475: Fatal error on membership page if membership status 'Cancelled' is disabled https://issues.civicrm.org/jira/browse/CRM-15475 --- diff --git a/CRM/Member/BAO/Query.php b/CRM/Member/BAO/Query.php index 6bcb800832..b15aec999a 100644 --- a/CRM/Member/BAO/Query.php +++ b/CRM/Member/BAO/Query.php @@ -253,11 +253,9 @@ class CRM_Member_BAO_Query { $query->_where[$grouping][] = CRM_Contact_BAO_Query::buildClause( "ccr.contribution_status_id", $op, - CRM_Core_DAO::getFieldValue( - 'CRM_Core_DAO_OptionValue', - 'Cancelled', - 'value', - 'name' + array_search( + 'Cancelled', + CRM_Contribute_PseudoConstant::contributionStatus(NULL, 'name') ), "Integer" );