}
/**
- * Get camel case version of entity or action name.
+ * Get camel case version of entity name.
*
- * @param $entity
+ * @param string|null $entity
*
- * @return string
+ * @return string|null
*/
function _civicrm_api_get_camel_name($entity) {
- return CRM_Utils_String::convertStringToCamel($entity);
+ return is_string($entity) ? CRM_Utils_String::convertStringToCamel($entity) : NULL;
}
/**
$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;
+ }
}
}
}
*/
function _civicrm_api_get_entity_name_from_dao($bao) {
$daoName = str_replace("BAO", "DAO", get_class($bao));
- return _civicrm_api_get_entity_name_from_camel(CRM_Core_DAO_AllCoreTables::getBriefName($daoName));
+ return CRM_Core_DAO_AllCoreTables::getBriefName($daoName);
}