Remove deprecated ids from OptionValue::add
authorEileen McNaughton <emcnaughton@wikimedia.org>
Tue, 27 Dec 2022 02:49:32 +0000 (15:49 +1300)
committerEileen McNaughton <emcnaughton@wikimedia.org>
Tue, 27 Dec 2022 02:49:32 +0000 (15:49 +1300)
CRM/Core/BAO/OptionValue.php

index 5b82142359dc8e32fd68c3731ea62f1abbf1b3bf..aeff6e50a4080a14bc2a9ab7e80df3987e9d97cd 100644 (file)
@@ -126,18 +126,13 @@ class CRM_Core_BAO_OptionValue extends CRM_Core_DAO_OptionValue implements \Civi
    *
    * @param array $params
    *   Reference array contains the values submitted by the form.
-   * @param array $ids
-   *   deprecated Reference array contains the id.
    *
    * @return \CRM_Core_DAO_OptionValue
    *
    * @throws \CRM_Core_Exception
    */
-  public static function add(&$params, $ids = []) {
-    if (!empty($ids['optionValue']) && empty($params['id'])) {
-      CRM_Core_Error::deprecatedFunctionWarning('$params[\'id\'] should be set, $ids is deprecated');
-    }
-    $id = $params['id'] ?? $ids['optionValue'] ?? NULL;
+  public static function add(&$params) {
+    $id = $params['id'] ?? NULL;
 
     // Update custom field data to reflect the new value
     if ($id && isset($params['value'])) {