Use setFile()

This commit is contained in:
Zach Borboa
2020-01-14 21:00:58 -08:00
parent 15a6a4dd98
commit cf9ab59780
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -326,7 +326,7 @@ class Curl
};
}
$this->setOpt(CURLOPT_FILE, $this->fileHandle);
$this->setFile($this->fileHandle);
$this->get($url);
return ! $this->error;
@@ -1608,7 +1608,7 @@ class Curl
// Reset CURLOPT_FILE with STDOUT to avoid: "curl_exec(): CURLOPT_FILE
// resource has gone away, resetting to default".
$this->setOpt(CURLOPT_FILE, STDOUT);
$this->setFile(STDOUT);
// Reset CURLOPT_RETURNTRANSFER to tell cURL to return subsequent
// responses as the return value of curl_exec(). Without this,
+1 -1
View File
@@ -122,7 +122,7 @@ class MultiCurl
}
}
$curl->setOpt(CURLOPT_FILE, $curl->fileHandle);
$curl->setFile($curl->fileHandle);
$curl->setOpt(CURLOPT_CUSTOMREQUEST, 'GET');
$curl->setOpt(CURLOPT_HTTPGET, true);
return $curl;