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

REST XML (APIv3) returns embedded error message, malforming the XML (ref: CRM/Utils/Array.php line 114)

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Major
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.0.7
    • Fix Version/s: 4.1.2
    • Component/s: CiviCRM API
    • Labels:
      None

      Description

      Hi,

      I'm trying to use APIv3 to search for a contact based on a custom field. The XML being returned is malformed, it includes a PHP error message referencing the CiviCRM "Array.php" file.

      The API call I'm making (although several others generate the same error):

      http://HOSTNAME/sites/all/modules/civicrm/extern/rest.php?version=3&entity=Contact&action=get&custom_19=X123456&key=KEY&PHPSESSID=lorem&api_key=ipsum

      Specific error message returned before the proper XML:

      Invalid argument supplied for foreach() in <b>/public_html/sites/all/modules/civicrm/CRM/Utils/Array.php</b> on line <b>114</b>.

      The correct XML is being included after the wrongly-included error messages so I can parse it with my scripts but I can't test in the browser. Any debugging advice?

      Thanks!

        Attachments

          Activity

            People

            • Assignee:
              xavier xavier dutoit
              Reporter:
              jimcraner Jim Craner
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Due:
                Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 2 hours
                2h
                Remaining:
                Remaining Estimate - 2 hours
                2h
                Logged:
                Time Spent - Not Specified
                Not Specified