Something deep inside Echo is using a Message object with the default $wgLang language despite being called during account auto-creation when $wgUser and $wgLang is not yet available.
Stack trace:
/srv/mediawiki/php-1.28.0-wmf.9/includes/user/User.php:5305 /srv/mediawiki/php-1.28.0-wmf.9/includes/user/User.php:2876 /srv/mediawiki/php-1.28.0-wmf.9/includes/context/RequestContext.php:363 /srv/mediawiki/php-1.28.0-wmf.9/includes/Message.php:364 /srv/mediawiki/php-1.28.0-wmf.9/includes/Message.php:1182 /srv/mediawiki/php-1.28.0-wmf.9/includes/Message.php:944 /srv/mediawiki/php-1.28.0-wmf.9/extensions/Echo/includes/ForeignNotifications.php:227 /srv/mediawiki/php-1.28.0-wmf.9/extensions/Echo/includes/ForeignNotifications.php:207 /srv/mediawiki/php-1.28.0-wmf.9/extensions/Echo/includes/ForeignWikiRequest.php:48 /srv/mediawiki/php-1.28.0-wmf.9/extensions/Echo/includes/ForeignWikiRequest.php:25 /srv/mediawiki/php-1.28.0-wmf.9/extensions/Echo/includes/NotifUser.php:710 /srv/mediawiki/php-1.28.0-wmf.9/extensions/Echo/includes/NotifUser.php:741 /srv/mediawiki/php-1.28.0-wmf.9/extensions/Echo/includes/NotifUser.php:488 /srv/mediawiki/php-1.28.0-wmf.9/extensions/Echo/Hooks.php:1147 /srv/mediawiki/php-1.28.0-wmf.9/includes/Hooks.php:195 /srv/mediawiki/php-1.28.0-wmf.9/includes/user/User.php:3952 /srv/mediawiki/php-1.28.0-wmf.9/includes/auth/AuthManager.php:1678 /srv/mediawiki/php-1.28.0-wmf.9/includes/Setup.php:861 /srv/mediawiki/php-1.28.0-wmf.9/includes/WebStart.php:137 /srv/mediawiki/php-1.28.0-wmf.9/index.php:40 /srv/mediawiki/w/index.php:3
Options to resolve this include:
- Don't even run the hook when called during account autocreation (I suspect it's not necessary there).
- Don't load messages in this code path (you don't seem to be actually using the result).
- Test $wgUser->isSafeToLoad(), and when false use ->inLanguage() to set the Message's language to $wgContLang or some other constant.