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

Api call to OptionValue/create for languages group gives an error

    Details

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

      Description

      Doing the following calls :
      $group_id=civicrm_api("OptionGroup","getvalue", array (version => '3','sequential' =>'1', 'name' => 'languages', 'return' =>'id'));
      $res = civicrm_api("OptionValue","create", array(version => '3', 'name' => $option['name'], 'option_group_id' => $group_id, 'label' => $label));

      Give the following result :
      Error: Access to undeclared static property: CRM_Core_PseudoConstant::$languages in
      /var/aegir/platforms/civicrm-4.3.1/sites/all/modules/civicrm/CRM/Core/PseudoConstant.php, line 480

        Attachments

          Activity

            People

            • Assignee:
              colemanw Coleman Watts
              Reporter:
              samuelsov Samuel Vanhove
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: