From: Coleman Watts Date: Wed, 1 Mar 2023 01:32:09 +0000 (-0500) Subject: Remove deprecated use of $ids X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=9b2c3a84ab26608f2f293f876109c9101fabc052;p=civicrm-core.git Remove deprecated use of $ids --- diff --git a/CRM/Core/BAO/OptionGroup.php b/CRM/Core/BAO/OptionGroup.php index 09e2169423..c7de6d7eea 100644 --- a/CRM/Core/BAO/OptionGroup.php +++ b/CRM/Core/BAO/OptionGroup.php @@ -52,18 +52,14 @@ class CRM_Core_BAO_OptionGroup extends CRM_Core_DAO_OptionGroup implements \Civi * Add the Option Group. * * @param array $params - * Reference array contains the values submitted by the form. - * @param array $ids - * Reference array contains the id. * * @deprecated * @return CRM_Core_DAO_OptionGroup */ - public static function add(&$params, $ids = []) { - if (empty($params['id']) && !empty($ids['optionGroup'])) { - CRM_Core_Error::deprecatedFunctionWarning('no $ids array'); - $params['id'] = $ids['optionGroup']; - } + public static function add($params) { + // This is very similar to CRM_Core_DAO::makeNameFromLabel which would be + // called automatically via `self::writeRecord()` + // TODO: Check if the differences matter, then deprecate this function and switch to writeRecord. if (empty($params['name']) && empty($params['id'])) { $params['name'] = CRM_Utils_String::titleToVar(strtolower($params['title'])); }