projects
/
civicrm-core.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1f86241
)
Respect zero value
author
Pradeep Nayak
<pradpnayak@gmail.com>
Wed, 23 Mar 2022 14:26:28 +0000
(14:26 +0000)
committer
Pradeep Nayak
<pradpnayak@gmail.com>
Wed, 23 Mar 2022 14:26:28 +0000
(14:26 +0000)
CRM/Admin/Form/Options.php
patch
|
blob
|
blame
|
history
diff --git
a/CRM/Admin/Form/Options.php
b/CRM/Admin/Form/Options.php
index b5002a575e0add14c94d204104cd3c92ecf1d71f..7ee186620cc2295e93edf6b78846ed85a0e7bbc1 100644
(file)
--- a/
CRM/Admin/Form/Options.php
+++ b/
CRM/Admin/Form/Options.php
@@
-113,7
+113,7
@@
class CRM_Admin_Form_Options extends CRM_Admin_Form {
// Default weight & value
$fieldValues = ['option_group_id' => $this->_gid];
foreach (['weight', 'value'] as $field) {
- if (
empty($defaults[$field])
) {
+ if (
!isset($defaults[$field]) || $defaults[$field] === ''
) {
$defaults[$field] = CRM_Utils_Weight::getDefaultWeight('CRM_Core_DAO_OptionValue', $fieldValues, $field);
}
}