Skip to content

Commit e903d57

Browse files
committed
Stil have a bug
1 parent fda3c6e commit e903d57

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/Curl/Curl.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ public function get($url, $data = array()) {
5858
public function post($url, $data=array()) {
5959
$this->setopt(CURLOPT_URL, $url);
6060
$this->setopt(CURLOPT_POST, TRUE);
61-
$this->setopt(CURLOPT_POSTFIELDS, http_build_query($data));
61+
$data = http_build_query($data);
62+
$this->setopt(CURLOPT_POSTFIELDS, $data);
6263
$this->_exec();
6364
}
6465

tests/CurlTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ public function testPostFilePathUpload() {
9393

9494
$data = array(
9595
'key' => 'image',
96-
'image' => $image,
96+
'image' => $image . ';filename=test.png;type=image/png',
9797
);
9898

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

0 commit comments

Comments
 (0)