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:
9ae4694
)
dev/core#2073 Fix memory leak in well tested code
author
eileen
<emcnaughton@wikimedia.org>
Wed, 7 Oct 2020 06:44:18 +0000
(19:44 +1300)
committer
eileen
<emcnaughton@wikimedia.org>
Wed, 7 Oct 2020 06:45:06 +0000
(19:45 +1300)
Example test
api_v3_ContactTest::testSortLimitChainedRelationshipGetCRM15983
CRM/Contact/BAO/Relationship.php
patch
|
blob
|
blame
|
history
diff --git
a/CRM/Contact/BAO/Relationship.php
b/CRM/Contact/BAO/Relationship.php
index 24122a128a84b9a4ecc81227948e5ffa2ed92300..7e6c9bfef293bd386f263d994e746188ced54500 100644
(file)
--- a/
CRM/Contact/BAO/Relationship.php
+++ b/
CRM/Contact/BAO/Relationship.php
@@
-983,8
+983,7
@@
WHERE relationship_type_id = " . CRM_Utils_Type::escape($type, 'Integer');
$queryString .= " AND id !=" . CRM_Utils_Type::escape($relationshipId, 'Integer');
}
- $relationship = new CRM_Contact_BAO_Relationship();
- $relationship->query($queryString);
+ $relationship = CRM_Core_DAO::executeQuery($queryString);
while ($relationship->fetch()) {
// Check whether the custom field values are identical.
$result = self::checkDuplicateCustomFields($params, $relationship->id);