Last modified: 2011-07-29 18:45:57 UTC
When you create a new revision object by using Revision::newFromArchiveRow() this revision object will not be able to call Revision::getTitle() with returning the right result. One way would be to set Revision::mTitle direclty from within Revision::newFromArchiveRow() which would require to load the title and namespace information from the archive row. Or a more complicated getTitle() function. By the way, there is a related bug in Revision::newFromArchiveRow() $row->page_id doesn't make any sense, it should be $row->ar_page_id, reported this in the mw irc channel already so perhaps it's fixed by now.
Related bug was fixed in r93081.
Looks like if the title isn't set it tries to look it up in the db on demand via the revision id -- which obviously fails if there's no revision. The Revision constructor will build a Title object if it sees that page_latest is present on an actual row (you joined against the 'page' table), but this isn't done in the other path. Probably should do: * inject the ar_namespace and ar_title into the array when doing Revision::newFromArchiveRow * in constructor: if namespace & title subfields are provided in the array, set mTitle with Title::makeTitle