Skip to content

Commit

Permalink
Merge pull request #174 from bc-ruth/OMNI-1167
Browse files Browse the repository at this point in the history
Revert #155
  • Loading branch information
aleachjr authored Jun 15, 2016
2 parents 345d27d + 407a278 commit 37087f7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Bigcommerce/Api/Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,9 @@ class Connection
*/
public function __construct()
{
if (!defined('STDIN')) {
define('STDIN', fopen('php://stdin', 'r'));
}
$this->curl = curl_init();
curl_setopt($this->curl, CURLOPT_HEADERFUNCTION, array($this, 'parseHeader'));
curl_setopt($this->curl, CURLOPT_WRITEFUNCTION, array($this, 'parseBody'));
Expand Down Expand Up @@ -445,6 +448,7 @@ public function put($url, $body)
curl_exec($this->curl);

fclose($handle);
curl_setopt($this->curl, CURLOPT_INFILE, STDIN);

return $this->handleResponse();
}
Expand Down

0 comments on commit 37087f7

Please sign in to comment.