zendesk/zendesk_api_client_php — pull request #12 by rendragnet (2014-05-06 00:45:57+00:00)
Title: A couple of updates as mentioned in the community forum

There are a few updates here.

1) Attachments were not working in the originally released library. The library was assuming zendesk API was taking standard HTTP POST'ed files. However it does not do this - it actually saves the entirety of the POST body. This meant that when you uploaded a file, the resulting file on Zendesk was mime encoded with multipart headers, etc. This now uploads correctly.

2) Modified the attachment process so that the user can supply the 'filename' param to specify what filename should be send to zendesk. This means that if you are accepting an uploaded file from a form and then uploading that to zendesk, you no longer have to do a file rename before uploading to have the file named (e.g.) Picture.jpg, instead of tmp228agdd2.

3) Corrected issue in Http.php whereby prepare was not removing the collection iterators from the params array after adding them to the endpoint url.

4) Corrected second issue in Http.php whereby send was not correctly building the url for a GET request, and checking for a ? character first. This was resulting in (e.g.) ?page=2?query=x