From: Aaron Schulz Date: Tue, 2 Jun 2015 18:38:43 +0000 (-0700) Subject: Fixed $flags bit operation precedence fail in User::loadFromDatabase() X-Git-Tag: 1.31.0-rc.0~11208 X-Git-Url: https://git.cyclocoop.org/%28%28?a=commitdiff_plain;h=833bdbab37cda3fabe8b69067bf1637a301c6af5;p=lhc%2Fweb%2Fwiklou.git Fixed $flags bit operation precedence fail in User::loadFromDatabase() * The bug made READ_LATEST also act as READ_LOCKING Bug: T100577 Bug: T100869 Bug: T98706 Change-Id: I85092970c236fc4482371216b9f6592c49a27942 --- diff --git a/includes/User.php b/includes/User.php index eb2a2dc2ed..fc07b6d63a 100644 --- a/includes/User.php +++ b/includes/User.php @@ -1229,7 +1229,7 @@ class User implements IDBAccessObject { self::selectFields(), array( 'user_id' => $this->mId ), __METHOD__, - ( $flags & self::READ_LOCKING == self::READ_LOCKING ) + ( ( $flags & self::READ_LOCKING ) == self::READ_LOCKING ) ? array( 'LOCK IN SHARE MODE' ) : array() );