OptionValue - Fix incorrect update of `is_default`
authorColeman Watts <coleman@civicrm.org>
Wed, 17 Nov 2021 02:15:42 +0000 (21:15 -0500)
committerColeman Watts <coleman@civicrm.org>
Wed, 17 Nov 2021 20:04:35 +0000 (15:04 -0500)
commit44f55016dc78432fb6cf19fa9a00d128287ea556
tree8416f7c511269245745eda7749e9eeb6be7ecf45
parentb19b0ae0dbdba96c14632cdf6424a51d7a0461f3
OptionValue - Fix incorrect update of `is_default`

Checking `!empty($params['is_default'])` gave a false-positive for the string 'null'.
CRM/Core/BAO/OptionValue.php
tests/phpunit/api/v4/Entity/OptionValueTest.php [new file with mode: 0644]