Skip to content

Commit 9cbea8b

Browse files
committed
Merge pull request php-curl-class#231 from zachborboa/master
Fix error when using a multidimensional array with Curl::patch()
2 parents 0cf3ae5 + 2465bf4 commit 9cbea8b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/Curl/Curl.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -442,9 +442,8 @@ public function patch($url, $data = array())
442442
$url = $this->baseUrl;
443443
}
444444
$this->setURL($url);
445-
$this->unsetHeader('Content-Length');
446445
$this->setOpt(CURLOPT_CUSTOMREQUEST, 'PATCH');
447-
$this->setOpt(CURLOPT_POSTFIELDS, $data);
446+
$this->setOpt(CURLOPT_POSTFIELDS, $this->buildPostData($data));
448447
return $this->exec();
449448
}
450449

0 commit comments

Comments
 (0)