* @return array|int
*/
function civicrm_api($entity, $action, $params, $extra = NULL) {
- return \Civi\Core\Container::singleton()->get('civi_api_kernel')->run($entity, $action, $params, $extra);
+ return \Civi::service('civi_api_kernel')->run($entity, $action, $params, $extra);
}
/**
}
/**
- * Get camel case version of entity or action name.
+ * Get camel case version of entity name.
*
* @param string|null $entity
*
$count = count($stringParts);
}
}
+ // CRM-16168 If we have failed to swap it out we should unset it rather than leave the placeholder.
+ if (substr($params[$field], 0, 6) == '$value') {
+ $params[$field] = NULL;
+ }
}
}
}