From 3ac2136c87adc68fca932f0cea3f599a8f517607 Mon Sep 17 00:00:00 2001 From: Pradeep Nayak Date: Mon, 3 Nov 2014 10:58:03 +0530 Subject: [PATCH] -- 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 --- CRM/Member/BAO/Query.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) 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" ); -- 2.25.1