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

Suggested PHP for API call is wrong.

    Details

    • Type: Improvement
    • Status: Done/Fixed
    • Priority: Trivial
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.1.2
    • Fix Version/s: 4.2.0
    • Component/s: CiviCRM API
    • Labels:

      Description

      The code suggested by the API explorer does the version number wrong:

      $results=civicrm_api("Event","create", array (version =3','sequential' =>'1', ...

      copy pasting this will result in a "white error page". It should be this:

      $results=civicrm_api("Event","create", array (version => '3','sequential' =>'1', ...

      The fix is to change line 119 in CRM/Core/AjaxDoc.tpl from:

      var vars = [], hash,smarty = '',php = " array (version =3\',",json = "{ ", link ="";

      to:

      var vars = [], hash,smarty = '',php = " array (version => \'3\',",json = "{ ", link ="";

        Attachments

          Activity

            People

            • Assignee:
              xavier xavier dutoit
              Reporter:
              jeroen Jeroen Bensch
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: