Enough with double caching hard coded arrays
authoreileen <emcnaughton@wikimedia.org>
Thu, 3 Mar 2016 00:59:57 +0000 (13:59 +1300)
committereileen <emcnaughton@wikimedia.org>
Tue, 8 Mar 2016 21:49:32 +0000 (10:49 +1300)
CRM/Dedupe/Merger.php

index 301e7f70591bcec40768eb65320d20054a9eeac2..647c6335e3ec4a55a38a8d3c9ec6c22c4e2b9fd3 100644 (file)
@@ -979,11 +979,7 @@ INNER JOIN  civicrm_membership membership2 ON membership1.membership_type_id = m
       $$moniker = $result['values'][$cid];
     }
 
-    static $fields = array();
-    if (empty($fields)) {
-      $fields = CRM_Contact_DAO_Contact::fields();
-      CRM_Core_DAO::freeResult();
-    }
+    $fields = CRM_Contact_DAO_Contact::fields();
 
     // FIXME: there must be a better way
     foreach (array('main', 'other') as $moniker) {