klaviyo / php-klaviyo

PHP wrapper for the Klaviyo API
59 stars 47 forks source link

Fix assignment of special attributes in ProfileModel #18

Closed simonorono closed 4 years ago

simonorono commented 4 years ago

Class properties use camel case but because of a bug in the setAttributes method, special attributes are being assigned as snake case, e.g. $first_name becomes first_name, and thus, it never gets used.

This bug makes the jsonSerialize method to always return phone, first and last name as null.

This commit fixes it by properly transforming keys to camel case.

smoucka commented 4 years ago

Hi @simonorono , thanks for bringing this to our attention. We are adding this into the following PR #19.