From: Jeffery To Date: Fri, 12 Jun 2009 11:58:30 +0000 (+0800) Subject: Fix "Trying to get property of non-object" errors when a user tries to log in using... X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=e2b20bd1e6087594b6069117ccb675f751ddc17a;p=quix0rs-gnu-social.git Fix "Trying to get property of non-object" errors when a user tries to log in using an unknown nickname --- diff --git a/lib/util.php b/lib/util.php index b3a94a5a01..32e178b3ee 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),