If a parserhook tries to get the title from the request context (as the UserFunctions extension does) then that will cause importTextFile.php to fail:
PHP Fatal error: Call to a member function getNamespace() on a non-object in /vagrant/mediawiki/extensions/UserFunctions/UserFunctions.php on line 84
PHP Stack trace:
PHP 1. {main}() /vagrant/mediawiki/maintenance/importTextFile.php:0
PHP 2. WikiPage->doEdit() /vagrant/mediawiki/maintenance/importTextFile.php:61
PHP 3. WikiPage->prepareTextForEdit() /vagrant/mediawiki/includes/WikiPage.php:1290
PHP 4. Parser->preSaveTransform() /vagrant/mediawiki/includes/WikiPage.php:1520
PHP 5. Parser->startParse() /vagrant/mediawiki/includes/parser/Parser.php:4305
PHP 6. Parser->clearState() /vagrant/mediawiki/includes/parser/Parser.php:4552
PHP 7. Parser->firstCallInit() /vagrant/mediawiki/includes/parser/Parser.php:249
PHP 8. wfRunHooks() /vagrant/mediawiki/includes/parser/Parser.php:237
PHP 9. Hooks::run() /vagrant/mediawiki/includes/GlobalFunctions.php:3859
PHP 10. call_user_func_array:{/vagrant/mediawiki/includes/Hooks.php:216}() /vagrant/mediawiki/includes/Hooks.php:216
PHP 11. UserFunctions_HookStub->registerParser() /vagrant/mediawiki/includes/Hooks.php:216
This can be fixed by calling RequestContext::getMain()->setTitle( $title ) at the right place.
Version: 1.23.0
Severity: normal