From 5c53f7964a212dd8883d46b4f03b2db062c04e86 Mon Sep 17 00:00:00 2001 From: Henjo Hoeksma Date: Fri, 23 May 2014 11:57:15 +0200 Subject: [PATCH] Fix warnings when login form is not yet posted --- index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.php b/index.php index cf558c9..9eab20c 100644 --- a/index.php +++ b/index.php @@ -9,7 +9,7 @@ if (isset($_GET['logout']) or isset($_POST['logout'])) { header("Location: index.php"); } -if (!is_logged_in() and $_POST['formname'] == "loginform") { +if (!is_logged_in() and isset($_POST['formname']) && $_POST['formname'] == "loginform") { if (try_login() === TRUE) { set_logged_in($_POST['username']); } else {