Fix adding many custom fields with logging on
authorElliott Eggleston <ejegg@ejegg.com>
Thu, 5 Aug 2021 01:23:29 +0000 (21:23 -0400)
committerElliott Eggleston <ejegg@ejegg.com>
Thu, 5 Aug 2021 01:23:29 +0000 (21:23 -0400)
commit0cb10002bc0bcff349bacf923b347422a82dc2fe
tree0515c1bdb481d79833004f7011a66d228e3e88f3
parent800a5dd643d81e7645a1a789a5a7d4a83bb81740
Fix adding many custom fields with logging on

This code is only triggered in the 'bulk' writeRecords codepath,
not in the createField codepath which is used for creating custom
fields via the UI.

To replicate: on a wmff build, turn loggin on, check out
https://gerrit.wikimedia.org/r/c/wikimedia/fundraising/crm/+/709873
and run drush update-custom-fields

Result prior to this patch: SQL syntax error message and new field
not added to logging table

Result with this patch: no error message, new field created on log
table.
CRM/Core/BAO/CustomField.php