summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2013-01-15 11:30:20 -0500
committerjim-p <jimp@pfsense.org>2013-01-15 11:30:20 -0500
commit4683015021e52c3fb3e617e97a1802e7317334b7 (patch)
tree4f4228af6a56c27495b9a699837c316235a160f4
parent6f165ffcdfce42ec7f3b75e668ed93a6e08b8564 (diff)
downloadpfsense-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.inc4
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 {
OpenPOWER on IntegriCloud