From 48949b42c7eb9644591d5a3523f66fa9f213356b Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Sun, 20 Jul 2008 15:41:12 +0000 Subject: [PATCH] reduced PHP notices --- lam/templates/config/profmanage.php | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/lam/templates/config/profmanage.php b/lam/templates/config/profmanage.php index f8c9abd7..3ebb9288 100644 --- a/lam/templates/config/profmanage.php +++ b/lam/templates/config/profmanage.php @@ -114,21 +114,27 @@ if ($_POST['submit']) { $config = new LAMConfig($_POST['setprofile']); $config->set_Passwd($_POST['setpassword']); $config->save(); + $config = null; $msg = _("New password set successfully."); } else $error = _("Profile passwords are different or empty!"); } // set default profile elseif ($_POST['action'] == "setdefault") { - $config = new LAMCfgMain(); - $config->default = $_POST['defaultfilename']; - $config->save(); + $configMain = new LAMCfgMain(); + $configMain->default = $_POST['defaultfilename']; + $configMain->save(); + $configMain = null; $msg = _("New default profile set successfully."); } // print messages - if ($error || $msg) { - if ($error) StatusMessage("ERROR", $error); - if ($msg) StatusMessage("INFO", $msg); + if (isset($error) || isset($msg)) { + if (isset($error)) { + StatusMessage("ERROR", $error); + } + if (isset($msg)) { + StatusMessage("INFO", $msg); + } } else exit; }