Author: happy.melon.wiki
Description:
Should be very trivial to fix, but I a) am off to bed, and b) have a corrupted working copy at the moment, so I'll post this here:
public function getUserPermissionsErrors( $action, $user, $doExpensiveQueries = true, $ignoreErrors = array() ) {
if( !StubObject::isRealObject( $user ) ) { //Since StubObject is always used on globals, we can unstub $wgUser here and set $user = $wgUser
global $wgUser;
$wgUser->_unstub( '', 5 ); $user = $wgUser; }
...
This is wrong because it is testing for stub-ness on $user, but then unconditionally unstubbing $wgUser, assuming that they must be the same. Why not just call $user->_unstub() ?? Needs investigating and patching.
Version: 1.16.x
Severity: minor