https://bugzilla.wikimedia.org/show_bug.cgi?id=44776
Web browser: ---
Bug ID: 44776
Summary: UploadWizard fails for certain values of
$wgFileExtensions
Product: MediaWiki extensions
Version: unspecified
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: Unprioritized
Component: UploadWizard
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected],
[email protected]
Classification: Unclassified
Mobile Platform: ---
This is a pathological case, but causes cryptic, poorly reported failure. If
$wgFileExtensions contains a value in common with $wgFileBlacklist,
UploadWizard refuses to upload files of any type.
This happens because Setup.php executes
$wgFileExtensions = array_diff ( $wgFileExtensions, $wgFileBlacklist );
and this creates an array with missing integer keys. This array is encoded for
JavaScript by the Xml class as an Object rather than an Array, and the call to
$j.inArray() that UploadWizard uses then fails on all files submitted.
To fix this, either Setup.php should use array_values( array_diff( ... ) ), or
else UploadWizard.config.php should say
'fileExtensions' => array_values($wgFileExtensions),
--
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.
You are watching all bug changes.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l