Never mind. It was simply how I was catching the thrown error.
But is this really an error that should cause an exception?
Everything in the api call was fine, but the file was rejected.
On Dec 18, 2011, at 7:58 AM, Adam Meyer wrote:
Im uploading files/images via the api, and it works perfectly.
When everything goes well, I get back an associative-array, with 'result'
[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.
<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() ?
MediaWiki-l mailing list