Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-4310

civicrm_contact_memberships_get() throws an exception when a contact has no relationships

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Trivial
    • Resolution: Fixed/Completed
    • Affects Version/s: 2.2.0
    • Fix Version/s: 2.2.2
    • Component/s: CiviCRM API
    • Labels:
      None

      Description

      Test case TestOfMembershipGetAPIV2 throws an exception that $relationships is assumed to be set, but has not been initialised.

      This patch adds a check to see if the variable $relationships has been set before trying to iterate it.

        Attachments

          Activity

            People

            • Assignee:
              kiran.jagtap Kiran Jagtap
              Reporter:
              xurizaemon Chris Burgess
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: