mirror of
https://github.com/php-curl-class/php-curl-class.git
synced 2026-08-31 12:43:14 +00:00
Store option set only when option successfully set
This commit is contained in:
+5
-2
@@ -892,8 +892,11 @@ class Curl
|
||||
trigger_error($required_options[$option] . ' is a required option', E_USER_WARNING);
|
||||
}
|
||||
|
||||
$this->options[$option] = $value;
|
||||
return curl_setopt($this->curl, $option, $value);
|
||||
$success = curl_setopt($this->curl, $option, $value);
|
||||
if ($success) {
|
||||
$this->options[$option] = $value;
|
||||
}
|
||||
return $success;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user