In FreshBooks_Element, the _getTagXML() method does not generate tags for
elements that have an empty string for a value. This makes it exceedingly
difficult for an application that is using FreshBooks PHP to clear a
previously-populated property of a FreshBooks object.
For example, consider a FreshBooks Client that has an secondary address. If
an application wants to clear it out on the FreshBooks site, the FreshBooks
API docs on developers.freshbooks.com indicate that the application needs
to send the client.update request and specify "s_street1", "s_street2", etc
tags without any values inside. But, if the application is using FreshBooks
PHP, setting $client->sStreet1 and $client->sStreet2 to empty strings will
cause them not to be transmitted.
I recommend switching this behavior over to using NULL as the indicator of
whether a field should be skipped, and using the PHP strict equals operator
(===) in the comparison.
Original issue reported on code.google.com by Guy.Padd...@gmail.com on 27 Apr 2010 at 4:33
Original issue reported on code.google.com by
Guy.Padd...@gmail.com
on 27 Apr 2010 at 4:33