projects
/
civicrm-core.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ff2c446
)
Fix unnecessary required param in contact BAO create
author
Coleman Watts
<coleman@civicrm.org>
Wed, 17 Apr 2019 00:45:36 +0000
(20:45 -0400)
committer
Coleman Watts
<coleman@civicrm.org>
Wed, 17 Apr 2019 21:00:03 +0000
(17:00 -0400)
Normally a BAO should require an id and nothing else for an update op
But the contact BAO required contact_type for no good reason.
CRM/Contact/BAO/Contact.php
patch
|
blob
|
blame
|
history
diff --git
a/CRM/Contact/BAO/Contact.php
b/CRM/Contact/BAO/Contact.php
index f1fb6929d82ea39bbe3ff8818f790d080fecfe17..4d5e276efa31194b03dffe7b3ffb33c588ccc8a0 100644
(file)
--- a/
CRM/Contact/BAO/Contact.php
+++ b/
CRM/Contact/BAO/Contact.php
@@
-272,6
+272,10
@@
class CRM_Contact_BAO_Contact extends CRM_Contact_DAO_Contact {
return $contact;
}
+ if (!empty($params['contact_id']) && empty($params['contact_type'])) {
+ $params['contact_type'] = self::getContactType($params['contact_id']);
+ }
+
$isEdit = TRUE;
if ($invokeHooks) {
if (!empty($params['contact_id'])) {