diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2007-02-23 01:48:55 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2007-02-23 01:48:55 +0000 |
commit | 0d427314512d71e681e6a7cc8de293c40cf6d42a (patch) | |
tree | fe901accb232c5484f8fac514bc2c2a745689f73 /etc/inc/pkg-utils.inc | |
parent | ebe1ef4efef7466b421e6895b653451057da6a38 (diff) | |
download | pfsense-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.inc | 3 |
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; } |