Last modified: 2014-03-17 14:47:06 UTC
API modules have a getContext() method that returns an ICOntextSource that can be used with EditEntity, etc. That context object has a getTitle() method that will return the context's internal title object or, if that is not set, $wgTitle. Some extensions, like AbuseFilter, rely on this Title object being present, the documentation of IContextSource also requires getTitle() to return a Title object, and never null. But in the API, $wgTitle may well be null, or, more frequently but just as bad, something nonsensical or inappropriate (e.g. the main page). API modules that modify an entity must ensure that getContext()->getTitle() returns the title object that refers to the entity the module is operating on. This is necessary to allow extensions like AbuseFilter to have the correct context for their task.
*bump*