jmathai/php-multi-curl — pull request #5 by jarseneault (2012-03-29 17:16:19+00:00)
Title: Check for completion of data before returning response

Hi,

We were experiencing an issue with EpiCurl where it would give an error when accessing the data after setting up a download. We found that the code downloads the HTTP headers prior to the data itself, and meant that when we accessed the data response, it could give an error stating it was not set because it hadn't finished downloading yet. Changing getResult to check for the 'data' key instead of the simple presence of the response guarantees that the download completes.

Let me know if I'm using this library incorrectly but this change did fix a number of issues on our end.

Thanks!