From 7560c9af7431e3bd49ca3ee97ab6c4bdaf4b6c38 Mon Sep 17 00:00:00 2001 From: eileen Date: Tue, 30 Jan 2018 10:53:13 +1300 Subject: [PATCH] Prevent intermittant fail on pcp api calls. When I run the SyntaxConformance tests locally I get a fatal error because it tries to include api_v3_pcp.php after having included api_v3_PCP.php & thinks they are 2 files. This is a Mac so obviously the handling is different to the jenkins method. Not overwriting the param if passed in works locally --- api/v3/utils.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/v3/utils.php b/api/v3/utils.php index f6f73bc5aa..7640e9ae12 100644 --- a/api/v3/utils.php +++ b/api/v3/utils.php @@ -1235,7 +1235,7 @@ function formatCheckBoxField(&$checkboxFieldValue, $customFieldLabel, $entity) { * @return array */ function _civicrm_api3_basic_get($bao_name, $params, $returnAsSuccess = TRUE, $entity = "", $sql = NULL, $uniqueFields = FALSE) { - $entity = CRM_Core_DAO_AllCoreTables::getBriefName(str_replace('_BAO_', '_DAO_', $bao_name)); + $entity = $entity ?: CRM_Core_DAO_AllCoreTables::getBriefName(str_replace('_BAO_', '_DAO_', $bao_name)); $options = _civicrm_api3_get_options_from_params($params); $query = new \Civi\API\Api3SelectQuery($entity, CRM_Utils_Array::value('check_permissions', $params, FALSE)); -- 2.25.1