I have code:

Array.prototype.unique = function (comparer) {
   //Function body, not important
}

The problem is that code in imce.js around line 100 picks the array prototype function as part of the array because the enumeration is done on the array as an object. This is what the code reads:

for (var i in subdirs) {//add subdirectories
      imce.dirAdd(prefix + subdirs[i], branch, true);
}

If the for ... in loop is used then a subdirs.hasOwnProperty(i) check should be made.

CommentFileSizeAuthor
imcebug.PNG5.41 KBapokryfos
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

apokryfos created an issue. See original summary.

  • ufku committed 5bea0b2 on 7.x-1.x
    Issue #2891824 by apokryfos: Fixed subdirs iteration.
    
ufku’s picture

Status: Active » Fixed

Committed. Thanks.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.