Answers.Body: <p>This is a bug and has been reported by @huulbaek as <a href="https://issues.civicrm.org/jira/browse/CRM-16393?jql=project%20%3D%20CRM" rel="nofollow">https://issues.civicrm.org/jira/browse/CRM-16393?jql=project%20%3D%20CRM</a></p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-05-01T13:42:22.110Z
Answers.LastActivityDate: 2015-05-01T13:42:22.110Z
Answers.UserDisplayName: Joe Murray
Body: <p>We recentely upgrade from 4.5.x to 4.6.2 and after that the following API call from PHP does not filter on contact_id and return all contributions for all contacts.</p>
  
  <pre><code>$params = array(
      'contact_id' =&gt; $contact_id,
  );
  $api-&gt;Contribution-&gt;Get($params);
  </code></pre>
  
  <p>In the backend explorer, the follow error occurs:</p>
  
  <pre><code>{
      "is_error": 1,
      "error_message": "A fatal error was triggered: CiviCRM is not of the type Int"
  }
  </code></pre>
  
  <p>Good ideas very welcome :)</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-04-27T14:56:14.177Z
Comments.Text: I just tested and can confirm that this is a bug.  Please submit a bug on issues.civicrm.org, reference this StackExchange question, and please note that it's a regression, so it will get more attention.
Comments.UserDisplayName: Jon G - Megaphone Tech
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-04-29T14:12:59.487Z
Comments.Text: Please consider answering your own question, stating the issue is a confirmed bug. It would be great if you also include a direct link to the bug report in your answer, to help future users who have this same problem.
Comments.UserDisplayName: Nicholai
Tags: <wordpress><api><contributions><php><4.6.2>
Title: Why does PHP Contribution API not filter on contact_id in 4.6.2?
ThreadText: # Why does PHP Contribution API not filter on contact_id in 4.6.2?
  
  (Asked by: username_0 on 2015-04-27)
  
  We recentely upgrade from 4.5.x to 4.6.2 and after that the following API call from PHP does not filter on contact\_id and return all contributions for all contacts.
  
  ```
  $params = array(
      'contact_id' => $contact_id,
  );
  $api->Contribution->Get($params);
  
  ```
  
  In the backend explorer, the follow error occurs:
  
  ```
  {
      "is_error": 1,
      "error_message": "A fatal error was triggered: CiviCRM is not of the type Int"
  }
  
  ```
  
  Good ideas very welcome :)
  
  **Tags:** wordpress, api, contributions, php, 4.6.2
  
  > **Comments:**
  > **username_1**: I just tested and can confirm that this is a bug.  Please submit a bug on issues.civicrm.org, reference this StackExchange question, and please note that it's a regression, so it will get more attention.  
  > **username_2**: Please consider answering your own question, stating the issue is a confirmed bug. It would be great if you also include a direct link to the bug report in your answer, to help future users who have this same problem.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_3 on 2015-05-01. Score: 3 | Accepted answer
  
  This is a bug and has been reported by @username_0 as <https://issues.civicrm.org/jira/browse/CRM-16393?jql=project%20%3D%20CRM>
  
  
  ---
  
  