PageTranslationHooks::onPageContentLanguage() must be an instance of Language, StubUserLang given
Closed, ResolvedPublicRelease

Description

Spotted in production:

Catchable fatal error: Argument 2 passed to PageTranslationHooks::onPageContentLanguage() must be an instance of Language, StubUserLang given in /srv/mediawiki/php-1.31.0-wmf.2/includes/Hooks.php on line 177

Mostly trying to remove stubbing entirely, but there might need to be a quicker bandaid fix for this.

Details

demon created this task.Oct 3 2017, 11:36 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptOct 3 2017, 11:36 PM

Change 382093 had a related patch set uploaded (by Krinkle; owner: Krinkle):
[mediawiki/extensions/Translate@master] Revert "Use Language type hint in hooks"

https://gerrit.wikimedia.org/r/382093

Change 382095 had a related patch set uploaded (by Krinkle; owner: Krinkle):
[mediawiki/extensions/Translate@wmf/1.31.0-wmf.2] Revert "Use Language type hint in hooks"

https://gerrit.wikimedia.org/r/382095

Change 382093 abandoned by Krinkle:
Revert "Use Language type hint in hooks"

Reason:
This isn't needed in master, given 7ab57ba290f670 removed StubUserLang in mediawiki/core. But I'm preparing a revert for wmf.2 just in case the error spreads.

https://gerrit.wikimedia.org/r/382093

Change 382095 merged by jenkins-bot:
[mediawiki/extensions/Translate@wmf/1.31.0-wmf.2] Revert "Use Language type hint in hooks"

https://gerrit.wikimedia.org/r/382095

Mentioned in SAL (#wikimedia-operations) [2017-10-04T13:41:12Z] <zfilipin@tin> Synchronized php-1.31.0-wmf.2/extensions/Translate/TranslateHooks.php: php-1.31.0-wmf.2/extensions/Translate/tag/PageTranslationHooks.php SWAT: [[gerrit:382095|Revert "Use Language type hint in hooks" (T177352)]] (duration: 00m 52s)

Mentioned in SAL (#wikimedia-operations) [2017-10-04T13:45:02Z] <zfilipin@tin> Synchronized php-1.31.0-wmf.2/extensions/Translate/TranslateHooks.php: SWAT: [[gerrit:382095|Revert "Use Language type hint in hooks" (T177352)]] (duration: 00m 50s)

Mentioned in SAL (#wikimedia-operations) [2017-10-04T13:46:10Z] <zfilipin@tin> Synchronized php-1.31.0-wmf.2/extensions/Translate/tag/PageTranslationHooks.php: SWAT: [[gerrit:382095|Revert "Use Language type hint in hooks" (T177352)]] (duration: 00m 50s)

@Krinkle FYI: I moved this to earlier SWAT.

Change 382093 restored by Nikerabbit:
Revert "Use Language type hint in hooks"

Reason:
For BC

https://gerrit.wikimedia.org/r/382093

Krinkle renamed this task from PageTranslationHooks::onPageContentLanguage() must be an instance of Language, StubUserLangGiven to PageTranslationHooks::onPageContentLanguage() must be an instance of Language, StubUserLang given.Oct 4 2017, 5:12 PM
Krinkle closed this task as Resolved.
Krinkle claimed this task.

Change 382093 merged by jenkins-bot:
[mediawiki/extensions/Translate@master] Revert "Use Language type hint in hooks"

https://gerrit.wikimedia.org/r/382093