Per gitlab
The DAO object since ? 4.7.x? has been freed on _destruct. Using the ->free action has been demonstrated to create some rare bugs - ie. because query sets from the outer loop can be lost. There is no benefit in calling it any more and some harm
https://github.com/civicrm/civicrm-core/pull/13192 was the last one in this series
$activityDAO->id = $params['id'];
$activityDAO->is_current_revision = 0;
if (!$activityDAO->save()) {
- if (is_object($activityDAO)) {
- $activityDAO->free();
- }
throw new API_Exception(ts("Unable to revision existing case activity."));
}
$createRevision = TRUE;
'email_id' => $dao->id,
);
}
- $dao->free();
foreach ($testEmailParams['emails'] as $key => $email) {
$email = trim($email);
$contactId = $emailId = NULL;
}
}
else {
- $dao->free();
throw new API_Exception('did not find a membership record');
}
- $dao->free();
return $result;
}
$result['undefined_fields'] = array_merge($undefined);
}
}
- if (is_object($dao)) {
- $dao->free();
- }
$result['version'] = 3;
if (is_array($values)) {