summaryrefslogtreecommitdiffstats
path: root/etc/inc/pkg-utils.inc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2007-02-23 01:48:55 +0000
committerScott Ullrich <sullrich@pfsense.org>2007-02-23 01:48:55 +0000
commit0d427314512d71e681e6a7cc8de293c40cf6d42a (patch)
treefe901accb232c5484f8fac514bc2c2a745689f73 /etc/inc/pkg-utils.inc
parentebe1ef4efef7466b421e6895b653451057da6a38 (diff)
downloadpfsense-0d427314512d71e681e6a7cc8de293c40cf6d42a.zip
pfsense-0d427314512d71e681e6a7cc8de293c40cf6d42a.tar.gz
Only write to stream if it is open.
Diffstat (limited to 'etc/inc/pkg-utils.inc')
-rw-r--r--etc/inc/pkg-utils.inc3
1 files changed, 2 insertions, 1 deletions
diff --git a/etc/inc/pkg-utils.inc b/etc/inc/pkg-utils.inc
index 96f928f..ae1fd87 100644
--- a/etc/inc/pkg-utils.inc
+++ b/etc/inc/pkg-utils.inc
@@ -350,7 +350,8 @@ function download_file_with_progress_bar($url_file, $destination_file) {
curl_exec($ch);
$http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
- fclose($fout);
+ if($fout)
+ fclose($fout);
curl_close($ch);
return ($http_code == 200) ? true : $http_code;
}
OpenPOWER on IntegriCloud