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
This commit is contained in:
parent
c16704c33a
commit
e907d4328d
1 changed files with 1 additions and 1 deletions
|
|
@ -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(),
|
||||
|
|
|
|||
Loading…
Reference in a new issue