From: cash Date: Mon, 7 Dec 2009 12:28:16 +0000 (+0000) Subject: fixed warning on access of array index that did not exist in session global X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=778589c635adb98278353d9438dc5ed0d8dbcbb2;p=lorea%2Felgg.git fixed warning on access of array index that did not exist in session global git-svn-id: http://code.elgg.org/elgg/trunk@3734 36083f99-b078-4883-b0ff-0f9b5a30f544 --- diff --git a/actions/login.php b/actions/login.php index 26a144045..86160bb00 100644 --- a/actions/login.php +++ b/actions/login.php @@ -12,7 +12,6 @@ action_gatekeeper(); // Get username and password - $username = get_input('username'); $password = get_input("password"); $persistent = get_input("persistent", false); @@ -28,9 +27,9 @@ if (!empty($username) && !empty($password)) { // Set the system_message as appropriate if ($result) { system_message(elgg_echo('loginok')); - if ($_SESSION['last_forward_from']) { + if (isset($_SESSION['last_forward_from']) && $_SESSION['last_forward_from']) { $forward_url = $_SESSION['last_forward_from']; - $_SESSION['last_forward_from'] = ""; + unset($_SESSION['last_forward_from']); forward($forward_url); } else { if ( (isadminloggedin()) && (!datalist_get('first_admin_login'))) {