dev/core#2524 - Fix missing serialization defaults
authoradriano66 <3438696+adriano66@users.noreply.github.com>
Thu, 16 Dec 2021 22:03:16 +0000 (23:03 +0100)
committeradriano66 <3438696+adriano66@users.noreply.github.com>
Sun, 13 Mar 2022 18:47:32 +0000 (19:47 +0100)
commitb6e509278e292627355fa5dc0aacd1a98f7d6a31
treeac7b2cfccdb3b7e6ceef1855efee7b483d0b75f1
parent1754e1752eb8e516ec846a438005f6fcb55be247
dev/core#2524 - Fix missing serialization defaults

This fixes the "'0' is not a valid option for field serialize" exception
in APIv3 as 0 is a valid, default value set in the DB
This allows passing whole custom field data as a parameter
to the custom field update method without getting an exception

Co-authored-by: colemanw <coleman@civicrm.org>
CRM/Core/DAO.php
CRM/Core/SelectValues.php
tests/phpunit/CRM/Core/DAOTest.php
tests/phpunit/api/v3/CustomFieldTest.php