Carlton B wrote:
Well, in this case I guess we've just got
different things going on, because
I didn't override AuthPlugin::initUser and I didn't modify
LoginForm::initUser or tamper with SpecialUserlogin.php in any way. The
only way I could get AuthPlugin to do an autocreate without throwing the
fatal error was by overriding AuthPlugin::initUser to return the reference
to the user it was passed.
Can you confirm that you made no other changes to the code? Have you
followed the execution path to make sure there's no other place that's
using the return value? Have you confirmed that the return value is used
by checking for the returned value?
I wonder if your reproduction was accurate,
because this is a tricky bug - even though it does throw a fatal error, the
new user account indeed does get created, and the problem will not repeat
itself as long as the user exists in the MW database.
That's exactly the reproduced behavior, yes.
I have gone back through your code explanation and I
can't find any fault
with it. The only remaining possibilities I can think of are:
1) Some method of the User class is setting the object to null in
LoginForm::initUser
2) PHP is getting its namespace confused and calling LoginForm::initUser
instead of AuthPlugin::initUser on line 254 of SpecialUserLogin.php.
Perhaps it's my version of PHP. I am on php 4.3.11.
Are you using any PHP accelerator plugins? If so, which and what versions?
Frankly I do not trust PHP 4's OO strategy to
correctly handle any remote
similarities in the namespace, so maybe renaming the AuthPlugin::initUser
interface to something else show this to be the case. Is this interface
widely referenced elsewhere, can I safely rename it on line 254 of
SpecialUserLogin.php and then change it to the same in my AuthUser
extension?
Have you tested this? Does it in fact help?
-- brion vibber (brion @
pobox.com)