diff --git a/src/Unirest/Request.php b/src/Unirest/Request.php index b95bb89..ff83782 100644 --- a/src/Unirest/Request.php +++ b/src/Unirest/Request.php @@ -374,8 +374,8 @@ class Request } if (self::$cookieFile) { - curl_setopt($ch, CURLOPT_COOKIEFILE, self::$cookieFile); - curl_setopt($ch, CURLOPT_COOKIEJAR, self::$cookieFile); + curl_setopt(self::$handle, CURLOPT_COOKIEFILE, self::$cookieFile); + curl_setopt(self::$handle, CURLOPT_COOKIEJAR, self::$cookieFile); } // supporting deprecated http auth method