Added user Id sanity check to setUsernameBitfields() for bug 34755.

Change-Id: I44288d199d86045151f8184f7abaa3df886d9d99
This commit is contained in:
Aaron Schulz 2012-03-29 16:31:39 -07:00
parent cd76555106
commit 2754304fef

View file

@ -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 );
}