PHP Client forces me to type a value as integer when attaching a file.
So far, all the API function calls haven't required me to type a number value as an integer...until I got to the PodioFile::attach - which is throwing an exception because the item id I'm passing it is a string. Using intval() solved the problem, but it's not consistent.
-
Function parameters other than $attributes and $options are used to generate a URL, those are all converted to strings for you. The $attributes hash is used to generate JSON and you'll need to provide values of the correct type there for transmission to the API. So it's pretty consistent. :)
In general you should provide values of the right types at all times and you won't run into problems :)
/Andreas
Please sign in to leave a comment.
Comments
2 comments