Store option set only when option successfully set

This commit is contained in:
Zach Borboa
2016-08-07 21:11:25 -07:00
parent e08e9b43ea
commit a8c2b53fa1
+5 -2
View File
@@ -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;
}
/**