From 407a278385e4e61bf657460f460669d359dd125c Mon Sep 17 00:00:00 2001 From: bc-ruth Date: Sat, 11 Jun 2016 21:55:22 -0700 Subject: [PATCH] OMNI-1167 Revert https://github.com/bigcommerce/bigcommerce-api-php/pull/155 --- src/Bigcommerce/Api/Connection.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Bigcommerce/Api/Connection.php b/src/Bigcommerce/Api/Connection.php index 8b2afae1..b84e0618 100644 --- a/src/Bigcommerce/Api/Connection.php +++ b/src/Bigcommerce/Api/Connection.php @@ -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')); @@ -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(); }