mirror of
https://github.com/php-curl-class/php-curl-class.git
synced 2026-09-04 14:56:26 +00:00
Call download callback only on success
This commit is contained in:
+1
-1
@@ -164,7 +164,7 @@ class Curl
|
||||
$this->setOpt(CURLOPT_FILE, $fh);
|
||||
$this->get($url);
|
||||
|
||||
if ($callback) {
|
||||
if (!$this->error && $callback) {
|
||||
rewind($fh);
|
||||
$callback($this, $fh);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user