Merge pull request #24117 from civicrm/5.52
[civicrm-core.git] / api / v3 / Profile.php
index a20bd48e1e813b387600d0e3ecc23c692123def9..6afa73b30aa12d59e5ac7fbeba0d7c979cbe94f8 100644 (file)
@@ -193,7 +193,7 @@ function civicrm_api3_profile_submit($params) {
     $contactEntities = ['contact', 'individual', 'organization', 'household'];
     $locationEntities = ['email', 'address', 'phone', 'website', 'im'];
 
-    $entity = strtolower(CRM_Utils_Array::value('entity', $field));
+    $entity = strtolower(CRM_Utils_Array::value('entity', $field, ''));
     if ($entity && !in_array($entity, array_merge($contactEntities, $locationEntities))) {
       switch ($entity) {
         case 'note':