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

_civicrm_api3_get_DAO() called on entities not present in CRM/Core/DAO/.listAll.php

    Details

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

      Description

      In 4.1beta3 using the api as follows:

      $params = array(
      'name' => 'ufGroup',
      'version' => '3',
      );
      $result = civicrm_api('constant','get',$params);

      throws PHP Notices: Undefined index: Constant in _civicrm_api3_get_DAO() (line 255 of /Users/shawn/Sites/civirelate/sites/all/modules/civicrm/api/v3/utils.php)

      because each of the following functions execute a getfields action through the api:
      _civicrm_api3_swap_out_aliases
      _civicrm_api3_getdefaults
      _civicrm_api3_getrequired

      and _civicrm_api_get_fields uses _civicrm_api3_get_DAO to build a $dao variable.

      Should we check that the array key exists in _civicrm_api3_get_DAO before using it?

        Attachments

          Activity

            People

            • Assignee:
              eileen Eileen McNaughton
              Reporter:
              fathershawn Shawn P. Duncan
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: