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

Misleading error message if json_decode fails in CRM/Utils/REST.php

    Details

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

      Description

      In CRM/Utils/REST.php, a failed json_decode gives an oddly specific error message.

      Appears to have been introduced with the patch http://issues.civicrm.org/jira/secure/attachment/18134/patch.txt but unsure how to associate an uploaded patch with a JIRA issue.

      There are many reasons json_decode might fail, double-quoting keys is one. The error message would be more useful if it describes what's happened (json_decode failed) without trying to guess at the cause.

        Attachments

          Activity

            People

            • Assignee:
              lobo Donald A. Lobo
              Reporter:
              xurizaemon Chris Burgess
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: