Skip to content

Commit beaddc7

Browse files
author
Josh Pettett
committed
removed unused async code
1 parent 0cbed77 commit beaddc7

1 file changed

Lines changed: 3 additions & 8 deletions

File tree

lib/Phaxio.php

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ public function doRequest($method, $path, $params = array(), $wrapInPhaxioOperat
8383
{
8484
$address = $this->host . $path;
8585

86-
$response = $this->curlRequest($method, $address, $params, false);
86+
$response = $this->curlRequest($method, $address, $params);
8787

8888
if ($this->debug) {
8989
echo "Response: \n\n";
@@ -123,11 +123,12 @@ public function doRequest($method, $path, $params = array(), $wrapInPhaxioOperat
123123
return $opResult;
124124
}
125125

126-
private function curlRequest($method, $address, $params = array(), $async = false)
126+
private function curlRequest($method, $address, $params = array())
127127
{
128128
$handle = curl_init($address);
129129

130130
curl_setopt($handle, CURLOPT_CUSTOMREQUEST, $method);
131+
curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);
131132

132133
# Authentication
133134
curl_setopt($handle, CURLOPT_USERPWD, $this->getApiKey() . ':' . $this->getApiSecret());
@@ -137,12 +138,6 @@ private function curlRequest($method, $address, $params = array(), $async = fals
137138
echo "Authentication: " . $this->getApiKey() . ':' . $this->getApiSecret() . "\n\n";
138139
}
139140

140-
if ($async) {
141-
curl_setopt($handle, CURLOPT_TIMEOUT, 1);
142-
} else {
143-
curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);
144-
}
145-
146141
$this->curlSetoptCustomPostfields($handle, $params);
147142
$result = curl_exec($handle);
148143

0 commit comments

Comments
 (0)