diff options
author | Jeffery To <jeffery.to@gmail.com> | 2009-06-12 19:58:30 +0800 |
---|---|---|
committer | Jeffery To <jeffery.to@gmail.com> | 2009-06-12 19:58:30 +0800 |
commit | e2b20bd1e6087594b6069117ccb675f751ddc17a (patch) | |
tree | 1b720a704565226fa4b22c2fc63f1c5fc1b1ba68 | |
parent | cfea2b0c4e21bc61ec250c8f34ec8c9aa6536e83 (diff) |
Fix "Trying to get property of non-object" errors when a user tries to log in using an unknown nickname
-rw-r--r-- | lib/util.php | 2 |
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), |