Skip to content

Commit 37087f7

Browse files
authored
Merge pull request #174 from bc-ruth/OMNI-1167
Revert #155
2 parents 345d27d + 407a278 commit 37087f7

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/Bigcommerce/Api/Connection.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,9 @@ class Connection
9191
*/
9292
public function __construct()
9393
{
94+
if (!defined('STDIN')) {
95+
define('STDIN', fopen('php://stdin', 'r'));
96+
}
9497
$this->curl = curl_init();
9598
curl_setopt($this->curl, CURLOPT_HEADERFUNCTION, array($this, 'parseHeader'));
9699
curl_setopt($this->curl, CURLOPT_WRITEFUNCTION, array($this, 'parseBody'));
@@ -445,6 +448,7 @@ public function put($url, $body)
445448
curl_exec($this->curl);
446449

447450
fclose($handle);
451+
curl_setopt($this->curl, CURLOPT_INFILE, STDIN);
448452

449453
return $this->handleResponse();
450454
}

0 commit comments

Comments
 (0)