Fixes output if location type is primary
authorVangelis Pantazis <v.pantazis@ixiam.com>
Fri, 25 Oct 2019 08:23:59 +0000 (09:23 +0100)
committerVangelis Pantazis <v.pantazis@ixiam.com>
Fri, 25 Oct 2019 08:23:59 +0000 (09:23 +0100)
CRM/Core/BAO/UFGroup.php

index a2bca835014506031c3be25c5ba364db57889180..5efead45453c8dd24e07e453599787cdef1a877b 100644 (file)
@@ -2445,6 +2445,13 @@ AND    ( entity_id IS NULL OR entity_id <= 0 )
                     }
                   }
                 }
+                else {
+                  if (substr($fieldName, 0, 14) === 'address_custom' &&
+                    CRM_Utils_Array::value(substr($fieldName, 8), $value)
+                  ) {
+                    $defaults[$fldName] = self::reformatProfileDefaults($field, $value[substr($fieldName, 8)]);
+                  }
+                }
               }
             }
           }