Fix exception in Import, when import of a revision fails
authoraude <aude.wiki@gmail.com>
Tue, 8 Sep 2015 14:18:03 +0000 (16:18 +0200)
committeraude <aude.wiki@gmail.com>
Tue, 22 Sep 2015 14:22:39 +0000 (16:22 +0200)
commit9442adf96d61579a15821248fd0b7560bfadb77c
tree8f54dc982a1871ce07886b9556ded89cc3ac8e16
parent5d9c1eeceb8f790397692ca3e34e9ef4c8b1ae71
Fix exception in Import, when import of a revision fails

A 'notice' is thrown when an import fails, for some reason,
such as the user does not have permission, and the reason
is reported to the user.

In this case, $title is false and not a Title object,
as needed by the beforeImportPage callback (which calls
WikiPage::factory).  As well, $pageInfo['_title'] is undefined,
in pageOutCallback, which also calls WikiPage::factory via
finishImportPage.

Bug: T108544
Change-Id: I55042fdf305cd1198d3a4b28a0ebb5ce31b76a1f
includes/Import.php