Fix UploadBase::checkXMLEncodingMissmatch() on PHP 7.1+
authorKunal Mehta <legoktm@member.fsf.org>
Thu, 7 Jun 2018 00:54:07 +0000 (17:54 -0700)
committerKrinkle <krinklemail@gmail.com>
Thu, 7 Jun 2018 08:36:09 +0000 (08:36 +0000)
commit30d58769ac54f8ef3f0c54558f43b9a73a68b37e
treef0c0d36f8dd89fd6e697f1eab69bde0ea20c0f84
parent34f4a899fb2897768108fe80fbd7ecdb1646135c
Fix UploadBase::checkXMLEncodingMissmatch() on PHP 7.1+

file_get_contents() started supporting a negative offset in 7.1+. But
we really just want to start with 0.

Also fix the order of arguments to assertSame() so that the expected
value is first.

Bug: T182366
Change-Id: I84c92652de5b51a43f6e2b58cd235d2889093453
RELEASE-NOTES-1.31
includes/upload/UploadBase.php
tests/phpunit/includes/upload/UploadBaseTest.php