Remove gaps from $wgFileExtensions array
authorLee Worden <worden.lee@gmail.com>
Sun, 24 Feb 2013 07:15:11 +0000 (23:15 -0800)
committerKrinkle <ttijhof@wikimedia.org>
Sun, 24 Feb 2013 13:19:08 +0000 (13:19 +0000)
commit6881e5f3657ff40532499a07ec608fc18f6ff3a0
tree0d446942a6ff3cb3572e0bfbf6a79bd9a5b65d71
parentd311beffec77b01e058f0ad1b9955af14d3ff95e
Remove gaps from $wgFileExtensions array

If $wgFileExtensions contains values that are in $wgFileBlacklist,
when Setup.php uses array_diff to remove them it leaves $wgFileExtensions
as an array with nonconsecutive integer indices.

When this array is encoded by the Xml class, for use in client-side
JavaScript, the nonconsecutive indices cause it to encode it as an
Object rather than Array.  This breaks the extension processing in
UploadWizard's JS code.  To fix this, use array_values to remove the
gaps in indices.

Bug: 44776
Change-Id: I4ef7f1de90a0384800722839f3fa3a581c63bac9
includes/Setup.php