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:
804112a
)
DAO - Prevent recursion adding acl clause to entity that references itself
author
colemanw
<coleman@civicrm.org>
Tue, 12 Sep 2023 16:30:01 +0000
(12:30 -0400)
committer
colemanw
<coleman@civicrm.org>
Tue, 12 Sep 2023 16:30:01 +0000
(12:30 -0400)
CRM/Core/DAO.php
patch
|
blob
|
blame
|
history
diff --git
a/CRM/Core/DAO.php
b/CRM/Core/DAO.php
index 3faae6f7235b1f8388a3b05fe96ad1832aaefbe1..b980479fcbdf980d5069719d8f9e1fa2e0249a5b 100644
(file)
--- a/
CRM/Core/DAO.php
+++ b/
CRM/Core/DAO.php
@@
-3097,7
+3097,8
@@
SELECT contact_id
$relatedClauses = [];
$relatedEntities = static::buildOptions('entity_table', 'get');
foreach ((array) $relatedEntities as $table => $ent) {
- if (!empty($ent)) {
+ // Prevent recursion
+ if (!empty($ent) && $table !== static::getTableName()) {
$ent = CRM_Core_DAO_AllCoreTables::getEntityNameForTable($table);
$subquery = CRM_Utils_SQL::mergeSubquery($ent);
if ($subquery) {