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

API v3 option_value_create() fails - does not pass sufficient arguments to core

    Details

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

      Description

      API v3 option_value_create is called, the core method (CRM_Core_BAO_OptionValue::add) throws an error as it does not receive the correct number of parameters.

      CRM_Core_BAO_OptionValue::add requires both $params and $ids, but only $params is passed by the API. There is very little information available as to what the $ids array is supposed to be contain, and so proposing a patch is difficult.

      I do note that the CRM_Core_BAO_CustomField does not call this particular method, but prefers CRM_Core_BAO_OptionValue::save. However, it is important that this call works for both creation and updates via the API.

        Attachments

          Activity

            People

            • Assignee:
              lobo Donald A. Lobo
              Reporter:
              tomgillett Tom Gillett
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: