From 80f62798a22fe12c22bf4ae8e72a3b23ea560b6a Mon Sep 17 00:00:00 2001 From: jitendrapurohit Date: Thu, 3 Mar 2016 14:54:52 +0530 Subject: [PATCH] use !empty() --- CRM/Contribute/Form/SoftCredit.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CRM/Contribute/Form/SoftCredit.php b/CRM/Contribute/Form/SoftCredit.php index 58bda1b0d3..78411d4d51 100644 --- a/CRM/Contribute/Form/SoftCredit.php +++ b/CRM/Contribute/Form/SoftCredit.php @@ -55,7 +55,7 @@ class CRM_Contribute_Form_SoftCredit { //check if any honree profile is enabled if yes then assign its profile type to $_honoreeProfileType // which will be used to constraint soft-credit contact type in formRule, CRM-13981 - if ($profileId[0] && $profileId[2] == 1) { + if (!empty($profileId[0]) && !empty($profileId[2])) { $form->_honoreeProfileType = CRM_Core_BAO_UFGroup::getContactType($profileId[0]); } } -- 2.25.1