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:
85eed44
)
dev/core#4703 edit with no parents crash
author
Samuel Vanhove
<samuel@symbiotic.coop>
Wed, 18 Oct 2023 21:59:59 +0000
(17:59 -0400)
committer
Seamus Lee
<seamuslee001@gmail.com>
Tue, 24 Oct 2023 01:19:06 +0000
(12:19 +1100)
CRM/Group/Form/Edit.php
patch
|
blob
|
blame
|
history
diff --git
a/CRM/Group/Form/Edit.php
b/CRM/Group/Form/Edit.php
index 7f615f322ec8de19a92a1120267dbe87970cc2fa..ebc9dd8a882091dd21c9a409f2e3040a4ef9b40d 100644
(file)
--- a/
CRM/Group/Form/Edit.php
+++ b/
CRM/Group/Form/Edit.php
@@
-412,7
+412,9
@@
WHERE title = %1
if (isset($form->_id)) {
$potentialParentGroupIds = CRM_Contact_BAO_GroupNestingCache::getPotentialCandidates($form->_id, $groupNames);
// put back current groups because they are selected by default
- $potentialParentGroupIds = array_merge($potentialParentGroupIds, $parentGroupIds);
+ if (!empty($parentGroupIds)) {
+ $potentialParentGroupIds = array_merge($potentialParentGroupIds, $parentGroupIds);
+ }
}
else {
$potentialParentGroupIds = array_keys($groupNames);