Fix warning in doEditSectionLink() caused by not-yet-unstubbed $wgLang
authorEdward Chernenko <edwardspec@gmail.com>
Mon, 15 Oct 2018 01:39:29 +0000 (04:39 +0300)
committerEdward Chernenko <edwardspec@gmail.com>
Mon, 15 Oct 2018 20:21:02 +0000 (23:21 +0300)
commit559b0f3e5487f66556bcedccfc95ad7d6dde4dab
tree48877464099eb396cf65c8803dd01550afb1416c
parent6cb3fa392f5772f9e5e7b4b4769da1ba4cfda891
Fix warning in doEditSectionLink() caused by not-yet-unstubbed $wgLang

In ParserOutput::getText(), $wgLang can be a StubUserLang object,
which causes a typecheck warning in doEditSectionLink().

Solution is to replace $wgLang with $context->getLanguage(),
which is always a Language object.

Change-Id: I9945e1615c3f1b7ed5c7897b9f67d7ca0450ee50
includes/parser/ParserOutput.php