X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;ds=sidebyside;f=CRM%2FFinancial%2FBAO%2FFinancialAccount.php;h=c23542e997f8a9ab3834030986673f0bcd962f48;hb=928a340b95528a9c44dfd335d6d31b183d910763;hp=062eef27e1ee908e353d537c6d3e90d95d0b7660;hpb=518669f7fc6076a1246f3628f243097338d73876;p=civicrm-core.git diff --git a/CRM/Financial/BAO/FinancialAccount.php b/CRM/Financial/BAO/FinancialAccount.php index 062eef27e1..c23542e997 100644 --- a/CRM/Financial/BAO/FinancialAccount.php +++ b/CRM/Financial/BAO/FinancialAccount.php @@ -32,11 +32,6 @@ */ class CRM_Financial_BAO_FinancialAccount extends CRM_Financial_DAO_FinancialAccount { - /** - * Static holder for the default LT. - */ - static $_defaultContributionType = NULL; - /** * Class constructor. */ @@ -72,8 +67,8 @@ class CRM_Financial_BAO_FinancialAccount extends CRM_Financial_DAO_FinancialAcco * @param bool $is_active * Value we want to set the is_active field. * - * @return CRM_Core_DAO|null - * DAO object on success, null otherwise + * @return bool + * true if we found and updated the object, else false */ public static function setIsActive($id, $is_active) { return CRM_Core_DAO::setFieldValue('CRM_Financial_DAO_FinancialAccount', $id, 'is_active', $is_active); @@ -268,7 +263,9 @@ WHERE cft.id = %1 Civi::$statics[__CLASS__]['entity_financial_account'][$financialTypeID][$accountRelationshipID] = $incomeAccountFinancialAccountID; } } - + if (!isset(Civi::$statics[__CLASS__]['entity_financial_account'][$financialTypeID][$relationTypeId])) { + Civi::$statics[__CLASS__]['entity_financial_account'][$financialTypeID][$relationTypeId] = NULL; + } } return Civi::$statics[__CLASS__]['entity_financial_account'][$financialTypeID][$relationTypeId]; }