Steps to replicate the issue (include links if applicable):
What happens?:
You see a page with error:
[1ed3e341128a47cd2d91fd56] 2023-01-06 10:39:52: Fatal exception of type "TypeError"
What should have happened instead?:
Redirect to home page
Software version (skip for WMF-hosted wikis like Wikipedia):
- MediaWiki - 1.40.0-alpha
- PHP - 7.4.33 (fpm-fcgi)
Other information (browser name/version, screenshots, etc.):
Stacktrace:
[2023-01-06T10:35:35.542411+00:00] exception.ERROR: [6161efb29c13633d3a34e94e] /wiki/Special:MyLanguage/Project_list TypeError: Argument 1 passed to Language::equals() must be an instance of Language, instance of MediaWiki\StubObject\StubUserLang given, called in /srv/mediawiki/tags/2023-01-04_14:36:20/includes/specials/SpecialMyLanguage.php on line 168 {"exception":"[object] (TypeError(code: 0): Argument 1 passed to Language::equals() must be an instance of Language, instance of MediaWiki\\StubObject\\StubUserLang given, called in /srv/mediawiki/tags/2023-01-04_14:36:20/includes/specials/SpecialMyLanguage.php on line 168 at /srv/mediawiki/tags/2023-01-04_14:36:20/includes/language/Language.php:4359) [stacktrace] #0 /srv/mediawiki/tags/2023-01-04_14:36:20/includes/specials/SpecialMyLanguage.php(168): Language->equals() #1 /srv/mediawiki/tags/2023-01-04_14:36:20/includes/specials/SpecialMyLanguage.php(106): SpecialMyLanguage->findTitleInternal() #2 /srv/mediawiki/tags/2023-01-04_14:36:20/includes/specials/SpecialMyLanguage.php(84): SpecialMyLanguage->findTitle() #3 /srv/mediawiki/tags/2023-01-04_14:36:20/includes/MediaWiki.php(276): SpecialMyLanguage->getRedirect() #4 /srv/mediawiki/tags/2023-01-04_14:36:20/includes/MediaWiki.php(916): MediaWiki->performRequest() #5 /srv/mediawiki/tags/2023-01-04_14:36:20/includes/MediaWiki.php(571): MediaWiki->main() #6 /srv/mediawiki/tags/2023-01-04_14:36:20/index.php(50): MediaWiki->run() #7 /srv/mediawiki/tags/2023-01-04_14:36:20/index.php(46): wfIndexMain() #8 {main} ","exception_url":"/wiki/Special:MyLanguage/Project_list","reqId":"6161efb29c13633d3a34e94e","caught_by":"entrypoint"} []
Without the Special:MyLanguage the URL redirects to the main page
This appears to be reproducible locally also if you create the following page:
#REDIRECT[[Special:MainPage]]
And try to navigate to it with Special:MyLanguage