CRM-5352 civicrm_activities_get_contact() returns "Invalid Data" error when no activities exist for contact

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Minor
    • Resolution: Fixed/Completed
    • Affects Version/s: 3.0.2
    • Fix Version/s: 3.2
    • Component/s: CiviCRM API
    • Labels:
      None

      Description

      civicrm_activities_get_contact() returns "Invalid Data" error when no activities exist for contact.

      The function hasn't failed, so it should not return an error. It should return an empty array of activities.

      $activity = array('contact_id' => $objectId);
      $ret = civicrm_activities_get_contact($activity);

        Attachments

          Activity

          [CRM-5352] civicrm_activities_get_contact() returns "Invalid Data" error when no activities exist for contact
          Donald A. Lobo added a comment -


          Would be great if you can contribute a patch and add some unit tests to validate it

          Priya Prajapati added a comment -

          tested for 3.2 rev-25956

            People

            • Assignee:
              Priya Prajapati
              Reporter:
              Glenn Nielsen

              Dates

              • Created:
                Updated:
                Resolved: