QuickBooks-V3-PHP-SDK icon indicating copy to clipboard operation
QuickBooks-V3-PHP-SDK copied to clipboard

fix: removeNullProperties should not filter out regular arrays

Open mgkimsal opened this issue 2 years ago • 0 comments

Existing removeNullProperties filtered out standard arrays, causing problems. Specifically, an $invoice object with $customerRef on it (with $customerRef['value']) was filtered out, causing "CustomerRef is missing" validation errors.

I added the count() check to ignore empty array values, which seems in spirit with the 'removeNull' intention.

Adding a test, based on the previously added testThatRemoveNullPropertiesLeavesNonNullValuesInPlace

mgkimsal avatar Aug 19 '21 14:08 mgkimsal