From b73af35164fc22c31f11eb812f5cff0d861de598 Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Tue, 27 Dec 2022 15:49:32 +1300 Subject: [PATCH] Remove deprecated ids from OptionValue::add --- CRM/Core/BAO/OptionValue.php | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/CRM/Core/BAO/OptionValue.php b/CRM/Core/BAO/OptionValue.php index 5b82142359..aeff6e50a4 100644 --- a/CRM/Core/BAO/OptionValue.php +++ b/CRM/Core/BAO/OptionValue.php @@ -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'])) { -- 2.25.1