Added user Id sanity check to setUsernameBitfields() for bug 34755.
Change-Id: I44288d199d86045151f8184f7abaa3df886d9d99
This commit is contained in:
parent
cd76555106
commit
2754304fef
1 changed files with 2 additions and 2 deletions
|
|
@ -34,10 +34,10 @@ class RevisionDeleteUser {
|
|||
* @return bool
|
||||
*/
|
||||
private static function setUsernameBitfields( $name, $userId, $op, $dbw ) {
|
||||
if( $op !== '|' && $op !== '&' ){
|
||||
if ( !$userId || ( $op !== '|' && $op !== '&' ) ) {
|
||||
return false; // sanity check
|
||||
}
|
||||
if( !$dbw instanceof DatabaseBase ){
|
||||
if ( !$dbw instanceof DatabaseBase ) {
|
||||
$dbw = wfGetDB( DB_MASTER );
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue