Subject: | Passing md5 to MediaWiki::API->edit doesn't report an error on fail. |
I'm trying to use the 'md5' parameter described here:
http://www.mediawiki.org/wiki/API:Edit#Parameters
I'm using it like this:
$mw->
edit({ action => 'edit',
title => $page_title,
## To avoid edit conflicts
basetimestamp => $timestamp,
text => $new_page_text,
summary => "uploading statistics for $page_title",
## Mark the edit as a bot edit.
bot => '',
## Guard against encoding corruption (I hope!)
## TODO: make encoding work good
md5 => md5_hex($new_page_text),
});
When this 'edit' fails, the $mw object returns without an error (I know
the edit fails due to the md5 mismatch, because it works when I comment
out that line... However, it works when the hashes match as far as I can
tell).
I'm not quite sure why the hashes fail to match, but the $mw object
should throw an error when it does.