From e907d4328dc3e1958e16e09e93c835a25bec3d2a Mon Sep 17 00:00:00 2001 From: Alangi Derick Date: Wed, 31 Oct 2018 13:22:58 +0100 Subject: [PATCH] Use identical check instead of equality check $user->getId() returns an int and it's strict on this, so the check here should be an identical check as "==" does unnecessary coercion. So "===" will be faster and improves on speed/performance. Change-Id: I28a4e86ab339f10251df8846b8d951b673fe4f9e --- includes/auth/AuthManager.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/auth/AuthManager.php b/includes/auth/AuthManager.php index c2e6d32523..aae5a83a22 100644 --- a/includes/auth/AuthManager.php +++ b/includes/auth/AuthManager.php @@ -1224,7 +1224,7 @@ class AuthManager implements LoggerAwareInterface { return $ret; } } else { - if ( $user->getId() == 0 ) { + if ( $user->getId() === 0 ) { $this->logger->debug( __METHOD__ . ': User does not exist locally when it should', [ 'user' => $user->getName(), 'creator' => $creator->getName(), -- 2.20.1