Merge pull request #17912 from eileenmcnaughton/flex2
[civicrm-core.git] / CRM / UF / Form / Field.php
index d99adfe45130ee8d21556497d69ad21459423db3..4bfcb214af81150eddebdc9b685c6a948d8218f7 100644 (file)
@@ -530,7 +530,7 @@ class CRM_UF_Form_Field extends CRM_Core_Form {
         $apiFormattedParams['location_type_id'] = $params['field_name'][2];
       }
     }
-    elseif ($params['field_name'][2] == 0) {
+    elseif (isset($params['field_name'][2]) && $params['field_name'][2] == 0) {
       // 0 is Primary location type
       $apiFormattedParams['location_type_id'] = '';
     }