From b5c6742eecf318ed847ea427000707fe5b6ef582 Mon Sep 17 00:00:00 2001 From: Aryeh Gregor Date: Thu, 24 Jan 2008 02:00:33 +0000 Subject: [PATCH] Comment tweak, remove strcmp(). --- includes/User.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/User.php b/includes/User.php index 08bf83c15e..ba77fddaf7 100644 --- a/includes/User.php +++ b/includes/User.php @@ -2018,11 +2018,11 @@ class User { /** - * Checks if a user with the given name exists, returns the ID + * Checks if a user with the given name exists, returns the ID. */ function idForName() { $s = trim( $this->getName() ); - if ( 0 == strcmp( '', $s ) ) return 0; + if ( $s === '' ) return 0; $dbr = wfGetDB( DB_SLAVE ); $id = $dbr->selectField( 'user', 'user_id', array( 'user_name' => $s ), __METHOD__ ); -- 2.20.1