From: jitendrapurohit Date: Thu, 3 Mar 2016 09:24:52 +0000 (+0530) Subject: use !empty() X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=80f62798a22fe12c22bf4ae8e72a3b23ea560b6a;p=civicrm-core.git use !empty() --- 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]); } }