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:
c75c0f2
)
Find DAO by ID instead of just calling the constructor and setting the ID
author
Jens Schuppe
<schuppe@systopia.de>
Fri, 29 Jul 2022 13:47:28 +0000
(15:47 +0200)
committer
Jens Schuppe
<schuppe@systopia.de>
Fri, 29 Jul 2022 13:47:28 +0000
(15:47 +0200)
Otherwise, finding references might fail because of missing entity values when comparing, e.g. `option_group_id` for OptionVaue BAOs.
Civi/Api4/Generic/ExportAction.php
patch
|
blob
|
blame
|
history
diff --git
a/Civi/Api4/Generic/ExportAction.php
b/Civi/Api4/Generic/ExportAction.php
index 87cd3c5048e96befd289d59d892a091852a7bb7f..b7e73717960ef36592aed1f02ee26d5f1b4ab2c5 100644
(file)
--- a/
Civi/Api4/Generic/ExportAction.php
+++ b/
Civi/Api4/Generic/ExportAction.php
@@
-159,8
+159,7
@@
class ExportAction extends AbstractAction {
$daoName = CoreUtil::getInfoItem($entityType, 'dao');
if ($daoName) {
/** @var \CRM_Core_DAO $dao */
- $dao = new $daoName();
- $dao->id = $entityId;
+ $dao = $daoName::findById($entityId);
// Collect references into arrays keyed by entity type
$references = [];
foreach ($dao->findReferences() as $reference) {