dev/core#1909 Fix E-notice when adding a field on a profile
authorSeamus Lee <seamuslee001@gmail.com>
Sun, 26 Jul 2020 21:06:03 +0000 (07:06 +1000)
committerSeamus Lee <seamuslee001@gmail.com>
Sun, 26 Jul 2020 21:06:03 +0000 (07:06 +1000)
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'] = '';
     }