Coerce all array values to strings before comparison in val(). Fixes bug #7123.
[jquery.git] / src / attributes.js
index ec4841b..147c353 100644 (file)
@@ -215,6 +215,10 @@ jQuery.fn.extend({
                                val = "";
                        } else if ( typeof val === "number" ) {
                                val += "";
+                       } else if ( jQuery.isArray(val) ) {
+                               val = jQuery.map(val, function (value) {
+                                       return value == null ? "" : value + "";
+                               });
                        }
 
                        if ( jQuery.isArray(val) && rradiocheck.test( this.type ) ) {