* is some form of an ApiMain, possibly even one that produces an error message,
* but we don't care here, as that is handled by the ctor.
*/
-$processor = new ApiMain( $wgRequest, $wgEnableWriteAPI );
+$processor = new ApiMain( RequestContext::getMain(), $wgEnableWriteAPI );
// Process data & print results
$processor->execute();