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:
272ebc1
)
Deal with group update without any parent
author
Samuel Vanhove
<samuel@symbiotic.coop>
Thu, 11 May 2023 18:28:40 +0000
(14:28 -0400)
committer
Samuel Vanhove
<samuel@symbiotic.coop>
Thu, 11 May 2023 18:28:40 +0000
(14:28 -0400)
CRM/Contact/BAO/Group.php
patch
|
blob
|
blame
|
history
diff --git
a/CRM/Contact/BAO/Group.php
b/CRM/Contact/BAO/Group.php
index 138bc13988c5a5c4696c4edd8d6bb4893064fd8e..7c6df47a41dae407733efc83c6a90e72a774d6db 100644
(file)
--- a/
CRM/Contact/BAO/Group.php
+++ b/
CRM/Contact/BAO/Group.php
@@
-372,8
+372,11
@@
class CRM_Contact_BAO_Group extends CRM_Contact_DAO_Group {
}
// get current parents for removal if not in the list anymore
+ $currentParentGroupIDs = [];
$parents = CRM_Core_DAO::getFieldValue('CRM_Contact_DAO_Group', $params['id'], 'parents');
- $currentParentGroupIDs = explode(',', $parents);
+ if (!empty($parents)) {
+ $currentParentGroupIDs = explode(',', $parents);
+ }
}
// form the name only if missing: CRM-627