summaryrefslogtreecommitdiff
path: root/lib/util.php
diff options
context:
space:
mode:
authorJeffery To <jeffery.to@gmail.com>2009-06-12 19:58:30 +0800
committerJeffery To <jeffery.to@gmail.com>2009-06-12 19:58:30 +0800
commite2b20bd1e6087594b6069117ccb675f751ddc17a (patch)
tree1b720a704565226fa4b22c2fc63f1c5fc1b1ba68 /lib/util.php
parentcfea2b0c4e21bc61ec250c8f34ec8c9aa6536e83 (diff)
Fix "Trying to get property of non-object" errors when a user tries to log in using an unknown nickname
Diffstat (limited to 'lib/util.php')
-rw-r--r--lib/util.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/util.php b/lib/util.php
index b3a94a5a0..32e178b3e 100644
--- a/lib/util.php
+++ b/lib/util.php
@@ -114,7 +114,7 @@ function common_check_user($nickname, $password)
return false;
}
$user = User::staticGet('nickname', $nickname);
- if (is_null($user)) {
+ if (is_null($user) || $user === false) {
return false;
} else {
if (0 == strcmp(common_munge_password($password, $user->id),