From 802958fe3d8a32984942203a45825444d387bb77 Mon Sep 17 00:00:00 2001 From: Adam Amstrong Date: Tue, 3 May 2011 11:28:39 +0000 Subject: [PATCH] less if $thing more if isset($thing). from lenwe. git-svn-id: http://www.observium.org/svn/observer/trunk@2220 61d68cd4-352d-0410-923a-c4978735b2b8 --- html/includes/authentication/http-auth.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/html/includes/authentication/http-auth.inc.php b/html/includes/authentication/http-auth.inc.php index cf5d352c0..0fb2334bb 100644 --- a/html/includes/authentication/http-auth.inc.php +++ b/html/includes/authentication/http-auth.inc.php @@ -11,7 +11,7 @@ function authenticate($username,$password) $sql = "SELECT username FROM `users` WHERE `username`='".$_SESSION['username'] . "'";; $query = mysql_query($sql); $row = @mysql_fetch_assoc($query); - if ($row['username'] && $row['username'] == $_SESSION['username']) + if (isset($row['username']) && $row['username'] == $_SESSION['username']) { return 1; }