Patch to add API support to Spam Blacklist
Regarding revision r42580.
When the spam blacklist triggers on an API edit, MediaWiki simply dies with a 500 Internal Server Error instead of returning any sort of proper error code. If php is configured not to output errors to the browser, the body of the error is an empty page; if it does output errors, the following is produced: (with php 5.2.6)
<br />
<b>Catchable fatal error</b>: Argument 2 passed to Parser::parse() must be an instance of Title, null given, called in /usr/local/src/MediaWiki/phase3/includes/OutputPage.php on line 633 and defined in <b>/usr/local/src/MediaWiki/phase3/includes/parser/Parser.php</b> on line <b>300</b><br />
The attached patch adds API support to Spam Blacklist, although I'm sure there is more than one way to do it. With this patch, an API edit attempt will now output something useful instead of crashing:
<?xml version="1.0"?><api><edit spamblacklist="http://blacklistme.example.com" result="Failure" /></api>
Version: unspecified
Severity: normal
Attached: