Skip to content

Commit

Permalink
Stil have a bug
Browse files Browse the repository at this point in the history
  • Loading branch information
amouhzi committed Nov 4, 2013
1 parent fda3c6e commit e903d57
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/Curl/Curl.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ public function get($url, $data = array()) {
public function post($url, $data=array()) {
$this->setopt(CURLOPT_URL, $url);
$this->setopt(CURLOPT_POST, TRUE);
$this->setopt(CURLOPT_POSTFIELDS, http_build_query($data));
$data = http_build_query($data);
$this->setopt(CURLOPT_POSTFIELDS, $data);
$this->_exec();
}

Expand Down
2 changes: 1 addition & 1 deletion tests/CurlTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public function testPostFilePathUpload() {

$data = array(
'key' => 'image',
'image' => $image,
'image' => $image . ';filename=test.png;type=image/png',
);

$this->curl->post($this->test_url . 'post_file_path_upload.php', $data);
Expand Down

0 comments on commit e903d57

Please sign in to comment.