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

v3 Utils.php civicrm_api3_verify_one_mandatory throws notice error for undefined $keys vairable

    Details

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

      Description

      If there are no $keyoptions passed into function civicrm_api3_verify_one_mandatory (api/v3/utils.php) then it calls "civicrm_api3_verify_mandatory ($params, $daoName, $keys );" using an undefined variable $keys which in turn throws a notice error about an undefined variable. I also assume that if there are $keyoptions there would also be a notice error because this function is setting the $key value on a nested array ($key[0][]) which isn't declared. My suggestion is to add the following at the beginning on the function:

      $keys = array(array());

        Attachments

          Activity

            People

            • Assignee:
              eileen Eileen McNaughton
              Reporter:
              tklawsuc Tom Klawsuc
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: