From 8c66b72dd479bad18be7571cb97f8b09cc65488c Mon Sep 17 00:00:00 2001
From: Andreas Gohr <gohr@cosmocode.de>
Date: Thu, 19 Jun 2014 12:01:49 +0200
Subject: [PATCH] fix IE upload when Array prototype has been modified

The edittable plugin broke uploading in IE8 (and maybe others) because
the Handsontable script adds a function to the Array prototype and the
uploading script did not properly check that.
---
 lib/scripts/fileuploader.js | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lib/scripts/fileuploader.js b/lib/scripts/fileuploader.js
index e75b8d3a5..d6278950b 100644
--- a/lib/scripts/fileuploader.js
+++ b/lib/scripts/fileuploader.js
@@ -226,7 +226,9 @@ qq.obj2url = function(obj, temp, prefixDone){
     } else if ((typeof obj != 'undefined') && (obj !== null) && (typeof obj === "object")){
         // for anything else but a scalar, we will use for-in-loop
         for (var i in obj){
-            add(obj[i], i);
+            if(obj.hasOwnProperty(i) && typeof obj[i] != 'function') {
+                add(obj[i], i);
+            }
         }
     } else {
         uristrings.push(encodeURIComponent(temp) + '=' + encodeURIComponent(obj));
-- 
GitLab