rem: if (ret[field]) ret[field] = new Array(); 
add: if (! ret[field]) ret[field] = new Array(); 
context: function eob_as_hash () {  var errors = this['errors'];  var extra1 = this['extra'];  var suffix = eob_get_val('as_hash_suffix', extra2, extra1, '_error');  var joiner = eob_get_val('as_hash_join',   extra2, extra1, '<br />');                                                    /// now add to the hash  var found = new Array();  var ret   = new Array();  for (var i = 0; i < errors.length; i ++) {    if (typeof(errors[i]) == 'string') continue;    if (! errors[i].length) continue;    var field     = errors[i][0];    var type      = errors[i][1];    var field_val = errors[i][2];    var ifs_match = errors[i][3];    if (! field) return alert("Missing field name");    if (field_val['delegate_error']) {      field = field_val['delegate_error'];      field = field.replace(new RegExp('\\$(\\d+)','g'), function (N) {        if (typeof(ifs_match) != 'object'            || typeof(ifs_match[N]) == 'undefined') return ''        return ifs_match[N];      });    }    var text = this.get_error_text(errors[i]);    if (! found[field]) found[field] = new Array();    if (found[field][text]) continue;    found[field][text] = 1;    field += suffix;    if (ret[field]) ret[field] = new Array();    ret[field].push(text);  }  /// allow for elements returned as   if (joiner) {    var header = eob_get_val('as_hash_header', extra2, extra1, '');    var footer = eob_get_val('as_hash_footer', extra2, extra1, '');    for (var key in ret) ret[key] = header + ret[key].join(joiner) + footer;  }  return ret;}
meta: 5443	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5443/36b6d6336f71148a2949342b6bf1af36a21992c1/validate.js/buggy/lib/CGI/Ex/validate.js