Fixed CRM-14677 by removing API result set limit.
authorFrank J. Gómez <frank@ginkgostreet.com>
Mon, 12 May 2014 23:02:18 +0000 (19:02 -0400)
committerFrank J. Gómez <frank@ginkgostreet.com>
Mon, 12 May 2014 23:02:18 +0000 (19:02 -0400)
----------------------------------------
* CRM-14677: "My billing address is the same as above" can break if profile has 25+ fields
  https://issues.civicrm.org/jira/browse/CRM-14677

CRM/Core/BAO/UFField.php

index cf288ec0a0d79da686bb87e9d82833ccd9306f84..843e97c38f8ea421a9e07cf6b9f3d00e6f485f35 100644 (file)
@@ -808,7 +808,11 @@ SELECT  id
     $billing_id = CRM_Core_BAO_LocationType::getBilling();
     list($prefixName, $index) = CRM_Utils_System::explode('-', $key, 2);
 
-    $profileFields = civicrm_api3('uf_field', 'get', array_merge($profileFilter, array('is_active' => 1, 'return' => 'field_name')));
+    $profileFields = civicrm_api3('uf_field', 'get', array_merge($profileFilter,
+      array('is_active' => 1, 'return' => 'field_name', 'options' => array(
+        'limit' => 0,
+      ))
+    ));
     //check for valid fields ( fields that are present in billing block )
     $validBillingFields = array(
       'first_name',