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

_civicrm_api3_generic_get_metadata_options() makes invalid civicrm_api() call

    Details

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

      Description

      In _civicrm_api3_generic_get_metadata_options() we do

      $pseudoParams['class'] = $fieldSpec['pseudoconstant'];
      $pseudoParams['version'] = 3;

      This will pass a value of (string) '3ontactType' as $params to civicrm_api(), which will then be rejected as $params is not an array.

      Observed developing Mailing,Create API extension; origin was -

      • civicrm_api('contact', 'getfields', array('version' => 3, 'action' => 'get');
      • _civicrm_api3_generic_getfields
      • _civicrm_api3_generic_get_metadata_options

        Attachments

          Activity

            People

            • Assignee:
              eileen Eileen McNaughton
              Reporter:
              xurizaemon Chris Burgess
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: