diff options
author | Renato Botelho <renato@netgate.com> | 2015-11-20 14:53:33 -0200 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2015-11-20 14:53:44 -0200 |
commit | b5b51aa60e7360ee97170dcd4b0cb77a4cd77c50 (patch) | |
tree | 603a450087a542c4eed9f944333c9059d9a82376 /src | |
parent | e88df20748ba6cc8c3ad5c5e9f928f79c28816d8 (diff) | |
download | pfsense-b5b51aa60e7360ee97170dcd4b0cb77a4cd77c50.zip pfsense-b5b51aa60e7360ee97170dcd4b0cb77a4cd77c50.tar.gz |
Always define $last_update_file to avoid calling file_put_contents with empty filename. Fixes #5502
Diffstat (limited to 'src')
-rw-r--r-- | src/etc/inc/pkg-utils.inc | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/etc/inc/pkg-utils.inc b/src/etc/inc/pkg-utils.inc index 821f610..787e33f 100644 --- a/src/etc/inc/pkg-utils.inc +++ b/src/etc/inc/pkg-utils.inc @@ -100,9 +100,8 @@ function pkg_update($force = false) { global $g; $now = strftime('%s'); + $last_update_file="{$g['varrun_path']}/{$g['product_name']}-upgrade-last-update"; if (!$force) { - $last_update_file="{$g['varrun_path']}/{$g['product_name']}-upgrade-last-update"; - if (file_exists($last_update_file)) { $last_update = rtrim(file_get_contents($last_update_file), "\n"); if (!is_numericint($last_update)) { |