version fixes
[civicrm-core.git] / CRM / Financial / BAO / FinancialType.php
index f76762b874d749effe88684f3d96c9637624146a..aa347c9082e8b1c28c88cafe25f4dff8e5228f47 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /*
   +--------------------------------------------------------------------+
-  | CiviCRM version 4.6                                                |
+  | CiviCRM version 4.7                                                |
   +--------------------------------------------------------------------+
   | Copyright CiviCRM LLC (c) 2004-2015                                |
   +--------------------------------------------------------------------+
@@ -75,7 +75,7 @@ class CRM_Financial_BAO_FinancialType extends CRM_Financial_DAO_FinancialType {
    *   Value we want to set the is_active field.
    *
    * @return Object
-   *   DAO object on sucess, null otherwise
+   *   DAO object on success, null otherwise
    */
   public static function setIsActive($id, $is_active) {
     return CRM_Core_DAO::setFieldValue('CRM_Financial_DAO_FinancialType', $id, 'is_active', $is_active);
@@ -133,9 +133,9 @@ class CRM_Financial_BAO_FinancialType extends CRM_Financial_DAO_FinancialType {
     $occurrences = $financialType->findReferences();
     if ($occurrences) {
       $tables = array();
-      foreach ($occurrences as $occurence) {
-        $className = get_class($occurence);
-        if (!in_array($className, $ignoreTables)) {
+      foreach ($occurrences as $occurrence) {
+        $className = get_class($occurrence);
+        if (!in_array($className, $tables) && !in_array($className, $ignoreTables)) {
           $tables[] = $className;
         }
       }