The most common code path is from EditAction, so make sure
EditPage::setContextTitle() is called in that case.
Log any uses that fallback to $wgTitle in the GlobalTitleFail log group.
Bug: T144366
Change-Id: Ie6c7dfbaa432239389d210051372427b8fa045b4
*/
public function getContextTitle() {
if ( is_null( $this->mContextTitle ) ) {
+ wfDebugLog(
+ 'GlobalTitleFail',
+ __METHOD__ . ' called by ' . wfGetAllCallers( 5 ) . ' with no title set.'
+ );
global $wgTitle;
return $wgTitle;
} else {
if ( Hooks::run( 'CustomEditor', [ $page, $user ] ) ) {
$editor = new EditPage( $page );
+ $editor->setContextTitle( $this->getTitle() );
$editor->edit();
}
}