Last modified: 2008-02-07 10:25:20 UTC
Created attachment 4431 [details] patch supposed to correct the bug found Bug found while checking the code with Eclipse 3.3
Could you please check if @@ -92,7 +92,7 @@ $fname ); while( $row = $dbr->fetchObject( $res ) ) { if ( $row->user_wiki == $this->thiswiki || $row->user_wiki == '*' ) { - if ( $row->user_password == wfEncryptPassword( $row->$user_id, $password ) ) { + if ( $row->user_password == wfEncryptPassword( $row->userId, $password ) ) { is really right? It's inconsistent to line 279. Thanks.
This cannot be (In reply to comment #1) > Could you please check if > @@ -92,7 +92,7 @@ > $fname ); > while( $row = $dbr->fetchObject( $res ) ) { > if ( $row->user_wiki == $this->thiswiki || > $row->user_wiki == '*' ) { > - if ( $row->user_password == wfEncryptPassword( > $row->$user_id, $password ) ) { > + if ( $row->user_password == wfEncryptPassword( > $row->userId, $password ) ) { > is really right? It's inconsistent to line 279. > Thanks. This cannot be correct given that the user id column in the user table is user_id not userId, therefore this line should be changed to if ( $row->user_password == wfEncryptPassword( $row->user_id, $password ) ) { Simply removing the second $ from $row->$user_id would fix this problem - although I believe that this is already acceptable syntax anyway, but better be on the safe side and probably generates some sort of error. Keeping second $ symbols out of object variable references also helps standardise code, but even so this may be a very minor issue.
Modified per comment #2 and applied with r30660.