Last modified: 2011-07-04 21:38:06 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T31676, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 29676 - jquery.client shouldn't use for-in-loops for arrays
jquery.client shouldn't use for-in-loops for arrays
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
JavaScript (Other open bugs)
1.20.x
All All
: Low minor (vote)
: ---
Assigned To: Derk-Jan Hartman
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-07-02 08:00 UTC by Michael M.
Modified: 2011-07-04 21:38 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Patch to replace for-in with for(;;) (743 bytes, patch)
2011-07-02 08:00 UTC, Michael M.
Details

Description Michael M. 2011-07-02 08:00:50 UTC
Created attachment 8731 [details]
Patch to replace for-in with for(;;)

This breaks when strange things are added to Array.prototype (and you never know what users do in their user scripts), so use for (var i = 0; i < ...length; i++ ) instead. I added a simple patch for this.
Comment 1 Derk-Jan Hartman 2011-07-02 08:32:50 UTC
Committed in r91341. Thanks for the patch Michael !

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links