Skip to content

Commit

Permalink
A typo, but a consistent typo...
Browse files Browse the repository at this point in the history
  • Loading branch information
tcdent committed May 16, 2015
1 parent 0e9acdb commit ed82b68
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions restclient.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,18 +150,18 @@ public function execute($url, $method='GET', $parameters=array(), $headers=array
// merged with parameters specified in the default options.
if(is_array($parameters)){
$parameters = array_merge($client->options['parameters'], $parameters);
$paraeters_string = $client->format_query($parameters);
$parameters_string = $client->format_query($parameters);
}
else
$paraeters_string = (string) $parameters;
$parameters_string = (string) $parameters;

if(strtoupper($method) == 'POST'){
$curlopt[CURLOPT_POST] = TRUE;
$curlopt[CURLOPT_POSTFIELDS] = $paraeters_string;
$curlopt[CURLOPT_POSTFIELDS] = $parameters_string;
}
elseif(strtoupper($method) != 'GET'){
$curlopt[CURLOPT_CUSTOMREQUEST] = strtoupper($method);
$curlopt[CURLOPT_POSTFIELDS] = $paraeters_string;
$curlopt[CURLOPT_POSTFIELDS] = $parameters_string;
}
elseif($parameters_string){
$client->url .= strpos($client->url, '?')? '&' : '?';
Expand Down

0 comments on commit ed82b68

Please sign in to comment.