Skip to content

Commit

Permalink
#30 Fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
linslin committed Apr 20, 2016
1 parent 854595e commit 9bf2af2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Curl.php
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ public function delete($url, $raw = true)
public function setOption($key, $value)
{
//set value
if (in_array($key, $this->_defaultOptions) && $key !== CURLOPT_WRITEFUNCTION) {
if (array_key_exists($key, $this->_defaultOptions) && $key !== CURLOPT_WRITEFUNCTION) {
$this->_defaultOptions[$key] = $value;
} else {
$this->_options[$key] = $value;
Expand Down
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,10 @@ class TestController extends Controller

Changelog
------------
##### Release 1.0.8 - Changelog
- Added API method `setOptions([array])` which allows to setup multiple options at once.
- Fixed Issue https://github.com/linslin/Yii2-Curl/issues/30.

##### Release 1.0.7 - Changelog
- Fixed `getInfo([, int $opt = 0 ])` exception were cURL wasn't initialized before calling `getInfo($opt)`.

Expand All @@ -212,19 +216,16 @@ Changelog
- Moved `parent::init();` behavior into unitTest Controller.

##### Release 1.0.2 - Changelog

- Added custom params support
- Added custom status code support
- Added POST-Param support and a readme example
- Removed "body" support at request functions. Please use "CURLOPT_POSTFIELDS" to setup a body now.
- Readme modifications

##### Release 1.0.1 - Changelog

- Removed widget support
- Edited some spellings + added more examples into readme.md

##### Release 1.0 - Changelog

- Official stable release

0 comments on commit 9bf2af2

Please sign in to comment.