API: Work around PHP bug 45959
authorBrad Jorsch <bjorsch@wikimedia.org>
Thu, 14 Jan 2016 21:11:44 +0000 (16:11 -0500)
committerBrad Jorsch <bjorsch@wikimedia.org>
Thu, 14 Jan 2016 21:13:04 +0000 (16:13 -0500)
commit8deb49f534073304fd501a96ef3fac7bda4c76ce
treeeaa7d80d2b3d41483c71735a68538253789d540e
parent10917c08720a648b060990c76691c0e4bcc18712
API: Work around PHP bug 45959

Sigh, PHP. You allow for an array to have string "1" as a key (e.g. when
casting from object to array), but then you do everything wrong when
trying to deal with it.

Bug: T123663
Change-Id: I49f09901a69aab39ca1519bbe9e41267bf9a1216
includes/api/ApiResult.php
tests/phpunit/includes/api/ApiResultTest.php