CiviCRM

'contribution_id' => false results in unexpected behavior

Details

  • Type: Bug Bug
  • Status: Open Open
  • Priority: Minor Minor
  • Resolution: Unresolved
  • Affects Version/s: 4.0.8
  • Fix Version/s: 4.2
  • Component/s: CiviCRM API
  • Labels:
    None
  • Is MIH?:
    No
  • Code Sprint:
    No

Description

An API call as
$params = array(
  'contribution_id' => false,
  'version' => 3,
  'check_permissions' => false,
);
$contribution = civicrm_api( 'Contribution', 'Get', $params);
does not result in an API response containing an error message but the following error:
Sorry. A non-recoverable error has occurred.
is not of the type Integer

Activity

Hide
Eileen McNaughton added a comment -
Yes - we will do this in the validate fields function. I think we need to get tests to 100% & then add this in 4.2.

Once done it will apply to all integer type fields & should probably respect FALSE = 0 & TRUE = 1
Show
Eileen McNaughton added a comment - Yes - we will do this in the validate fields function. I think we need to get tests to 100% & then add this in 4.2. Once done it will apply to all integer type fields & should probably respect FALSE = 0 & TRUE = 1

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated: