Last modified: 2011-12-06 15:17:06 UTC
Created attachment 9614 [details] Patch to fix the bug. When error reporting is turned on and I use the NetworkAuth extension, I get the following warning: Notice: Undefined variable: u in (...)/extensions/NetworkAuth/NetworkAuth.php on line 123 As noted on the extensions talk page by user 朝彦 (Asahiko): http://www.mediawiki.org/wiki/Extension_talk:NetworkAuth this is caused by the usage of the function is_null($u) to check whether the variable $u contains something useful. However, when $u is not defined, this causes the warning. The solution is to replace is_null($u) by !isset($u). I have attached a patch for NetworkAuth.php to solve the problem.
Fixed with numerous other issues in r105184
Sorry, I have to reopen the bug. The fixes in r105184 have actually really messed up the code, as it changed the logics. I attach a patch that fixes the fix.
Created attachment 9622 [details] Patch that fixes the broken fix.
(In reply to comment #2) > Sorry, I have to reopen the bug. The fixes in r105184 have actually really > messed up the code, as it changed the logics. I attach a patch that fixes the > fix. It was done purposely as it was horrendously written, having empty cases and such, so I inverted the logic to tidy it up somewhat After the followup in r105185 it's fine
Created attachment 9623 [details] Patch that fixes the (still) broken fix. Sorry, but no, it's not fine. The '!' in front of the User::isUsableName( $u->getName() ) is too much. My patch furthermore puts all clause into one expression, which makes the whole thing more readble.
r105300