Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes the 'Empty reply fromm server' error (API Error bigcommerce#52)…
… as well as another bug where too many files are opened by PHP. The changes were made to the put function found in the `src/Bigcommerce/Api/Connection.php` and involves only the way the file handler for the temporary CURL file is used and managed by doing the following: - Checking for a valid instance of the `$this->handle`, - If no valid `$this->handle` was found, opens a new temp file with tmpfile() and assigns to `$this->handle` - Performs an additional check to see if the temp file contains any content from a previous use of the file, truncates the file to 0 bytes, closes and reopens the file, and rewinds the pointer to the beginning of the file Then the put function proceeds as before by writing the body of the request to the file.
- Loading branch information