From: eileen Date: Wed, 3 Feb 2016 21:30:14 +0000 (+1300) Subject: Add default to function signature X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=0be95659a7ffa3e15643aab2a380eb5e82bc91e8;p=civicrm-core.git Add default to function signature --- diff --git a/CRM/Core/BAO/OptionValue.php b/CRM/Core/BAO/OptionValue.php index 0e3bb21dc5..6386676f99 100644 --- a/CRM/Core/BAO/OptionValue.php +++ b/CRM/Core/BAO/OptionValue.php @@ -169,7 +169,7 @@ class CRM_Core_BAO_OptionValue extends CRM_Core_DAO_OptionValue { * * @return CRM_Core_DAO_OptionValue */ - public static function add(&$params, $ids) { + public static function add(&$params, $ids = array()) { // CRM-10921: do not reset attributes to default if this is an update //@todo consider if defaults are being set in the right place. 'dumb' defaults like // these would be usefully set @ the api layer so they are visible to api users diff --git a/CRM/Core/OptionValue.php b/CRM/Core/OptionValue.php index 06c066cb7d..f0ea310aed 100644 --- a/CRM/Core/OptionValue.php +++ b/CRM/Core/OptionValue.php @@ -181,6 +181,7 @@ class CRM_Core_OptionValue { * */ public static function addOptionValue(&$params, &$groupParams, &$action, &$optionValueID) { + $ids = array(); $params['is_active'] = CRM_Utils_Array::value('is_active', $params, FALSE); // checking if the group name with the given id or name (in $groupParams) exists if (!empty($groupParams)) {