loopline-systems / closeio-api-wrapper

PHP Wrapper to use the Close.io API
MIT License
14 stars 15 forks source link

Allow setting null on a custom field to unset it from a lead #97

Closed ste93cry closed 5 years ago

ste93cry commented 5 years ago

Closes #95

Q A
Bug fix? yes
New feature? no
BC breaks? yes
Deprecations? no

I don't know if this can be considered a new feature or a bug fix, the only certain thing is that it's a BC break :disappointed: The problem fixed with this PR is that it was not possible to unset a custom field from a lead. API supports passing null values to remove the association between a field and a lead, however the code was filtering out from the JSON request all values that would evaluate to false using array_filter and this prevented any attempt to unset a field to fail.

coveralls commented 5 years ago

Coverage Status

Coverage increased (+0.07%) to 17.966% when pulling d7808e5e5a5372f3caca0430725d7670903000d3 on ste93cry:feature/allow-fields-to-be-unset into 960fbe3f5e9cb6f5fc87b1c5ebcca0661e2131e2 on loopline-systems:develop.