Signed-off-by: Matthieu Moy <Matthieu.Moy@xxxxxxx> --- contrib/mw-to-git/git-remote-mediawiki | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/contrib/mw-to-git/git-remote-mediawiki b/contrib/mw-to-git/git-remote-mediawiki index dd18142..63f02b8 100755 --- a/contrib/mw-to-git/git-remote-mediawiki +++ b/contrib/mw-to-git/git-remote-mediawiki @@ -939,6 +939,14 @@ sub mw_import_revids { my $result = $mediawiki->api($query); + if (!$result) { + die "Failed to retrieve modified page for revision $pagerevid"; + } + + if (!defined($result->{query}->{pages})) { + die "Invalid revision $pagerevid."; + } + my @result_pages = values(%{$result->{query}->{pages}}); my $result_page = $result_pages[0]; my $rev = $result_pages[0]->{revisions}->[0]; -- 1.7.11.1.147.g47a574d -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html