CRM-18954: Error on adding a field to a profile used by a contribution page
authoryashodha <yashodha.chaku@webaccessglobal.com>
Wed, 15 Jun 2016 10:31:39 +0000 (16:01 +0530)
committeryashodha <yashodha.chaku@webaccessglobal.com>
Wed, 15 Jun 2016 10:31:39 +0000 (16:01 +0530)
----------------------------------------
* CRM-18954: Error on adding a field to a profile used by a contribution page
  https://issues.civicrm.org/jira/browse/CRM-18954

CRM/Core/BAO/UFField.php

index fe3c5c9d6030f670f18a504ebb2b7a8b1d98b4a7..a844aaec283b418d910d77f6f1661fcd79590d7f 100644 (file)
@@ -796,7 +796,7 @@ SELECT  id
       if (in_array($field['field_name'], $validBillingFields)) {
         $validProfileFields[] = $field['field_name'];
       }
-      if ($field['is_required']) {
+      if (CRM_Utils_Array::value('is_required', $field)) {
         $requiredProfileFields[] = $field['field_name'];
       }
     }
@@ -807,7 +807,7 @@ SELECT  id
 
     if (!empty($index) && (
         // it's empty so we set it OR
-        !CRM_Utils_array::value($prefixName, $profileAddressFields)
+        !CRM_Utils_Array::value($prefixName, $profileAddressFields)
         //we are dealing with billing id (precedence)
         || $index == $billing_id
         // we are dealing with primary & billing not set