Some types of result don't have a top-level warnings element, but instead might have it one level down. For example, a duplicate upload can result in:
Array
(
[upload] => Array
(
[result] => Warning
[warnings] => Array
(
[duplicate-archive] => Test.jpg
)
[filekey] => 157pzg7r75j4.bs0wl9.15.jpg
[sessionkey] => 157pzg7r75j4.bs0wl9.15.jpg
)
)MediawikiApi::logWarnings() only currently looks for the top-level warnings.
(Google Code-In link: https://codein.withgoogle.com/dashboard/task-instances/6354431006212096 )