We set $wgTitle to a dummy title, and RequestContext::getMain()->getTitle()
falls back to that so everything *works*, but RequestContext whines
about it.
Set the same dummy title explicitly on RequestContext::getMain() to shut
things up.
Bug: T78414
Change-Id: I5b90df16cf2f51a6edd5898e9712161f335202a7
// In a perfect world this wouldn't be necessary
$wgTitle = Title::makeTitle( NS_MAIN, 'API' );
+// RequestContext will read from $wgTitle, but it will also whine about it.
+// In a perfect world this wouldn't be necessary either.
+RequestContext::getMain()->setTitle( $wgTitle );
+
try {
/* Construct an ApiMain with the arguments passed via the URL. What we get back
* is some form of an ApiMain, possibly even one that produces an error message,