}
}
- if (is_array($params) && !empty($params['debug'])) {
+ if (is_array($params) && $entity && !empty($params['debug'])) {
if (is_string($action) && $action !== 'getfields') {
$apiFields = civicrm_api($entity, 'getfields', ['version' => 3, 'action' => $action] + $params);
}
CRM_Utils_Hook::pre($hook, $entityName, CRM_Utils_Array::value('id', $params), $params);
$instance = new $dao_name();
- $instance->copyValues($params, TRUE);
+ $instance->copyValues($params);
$instance->save();
CRM_Utils_Hook::post($hook, $entityName, $instance->id, $instance);
*/
function _civicrm_api3_deprecation_check($entity, $result = []) {
if ($entity) {
- $apiFile = "api/v3/$entity.php";
- if (CRM_Utils_File::isIncludable($apiFile)) {
- require_once $apiFile;
- }
$lowercase_entity = _civicrm_api_get_entity_name_from_camel($entity);
$fnName = "_civicrm_api3_{$lowercase_entity}_deprecation";
if (function_exists($fnName)) {