[Mediawiki-l] API upload image error messges
Adam Meyer
meyer7 at mindspring.com
Sun Dec 18 14:58:09 UTC 2011
MW 1.17
Im uploading files/images via the api, and it works perfectly.
When everything goes well, I get back an associative-array, with 'result' equaling 'Success'
[result] => Success
[imageinfo] => Array
When there is a warning I get:
[result] => Warning
[warnings] => warning list array
But when there is an error, it just spits out a paragraph tag, with the error in it. like:
<p>verification-error: This file did not pass file verification</p>
I thought the was strange, shouldn't it come back like so?
[result] => Error
[errors] => error list array
So how do I check for errors without doing is_array() ?
Thanks,
-Adam
More information about the MediaWiki-l
mailing list