Skip to content

Commit

Permalink
Prevent intermittant fail on pcp api calls.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
eileenmcnaughton committed Jan 29, 2018
1 parent 06d7516 commit 515d293
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/v3/utils.php
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit 515d293

Please sign in to comment.