diff options
author | jim-p <jimp@pfsense.org> | 2013-01-15 11:30:20 -0500 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2013-01-15 11:30:20 -0500 |
commit | 4683015021e52c3fb3e617e97a1802e7317334b7 (patch) | |
tree | 4f4228af6a56c27495b9a699837c316235a160f4 | |
parent | 6f165ffcdfce42ec7f3b75e668ed93a6e08b8564 (diff) | |
download | pfsense-4683015021e52c3fb3e617e97a1802e7317334b7.zip pfsense-4683015021e52c3fb3e617e97a1802e7317334b7.tar.gz |
Better test if we're running at the cli or in lighty. Also suppress output for the session start if it fails.
-rw-r--r-- | etc/inc/config.lib.inc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/etc/inc/config.lib.inc b/etc/inc/config.lib.inc index f496562..c2348c8 100644 --- a/etc/inc/config.lib.inc +++ b/etc/inc/config.lib.inc @@ -494,9 +494,9 @@ function write_config($desc="Unknown", $backup = true) { log_error("WARNING! Configuration written on bootup. This can cause stray openvpn and load balancing items in config.xml"); */ - if (!isset($argc)) { + if (!empty($_SERVER['REMOTE_ADDR'])) { if (!session_id()) - session_start(); + @session_start(); $username = empty($_SESSION["Username"]) ? "(system)" : $_SESSION['Username']; session_commit(); } else { |