Don't expose condition to api.getoptions
authorColeman Watts <coleman@civicrm.org>
Tue, 26 Mar 2019 22:16:18 +0000 (18:16 -0400)
committerSeamus Lee <seamuslee001@gmail.com>
Wed, 15 May 2019 20:25:18 +0000 (06:25 +1000)
api/v3/Generic.php

index c88419ccb40b0ebd3226d3867079b0bc2795674c..6dfb1c81383a37cc8b2930a345fe11b7279c8ff8 100644 (file)
@@ -432,7 +432,7 @@ function civicrm_api3_generic_getoptions($apiRequest) {
   // Validate 'context' from params
   $context = CRM_Utils_Array::value('context', $apiRequest['params']);
   CRM_Core_DAO::buildOptionsContext($context);
-  unset($apiRequest['params']['context'], $apiRequest['params']['field']);
+  unset($apiRequest['params']['context'], $apiRequest['params']['field'], $apiRequest['params']['condition']);
 
   $baoName = _civicrm_api3_get_BAO($apiRequest['entity']);
   $options = $baoName::buildOptions($fieldName, $context, $apiRequest['params']);