From 9117771ea2662dc20dc56dc8acdfe3aaf6139912 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Fri, 4 Dec 2015 19:59:05 +0000 Subject: [PATCH] Avoid errors for invalid account options --- etemplate/js/et2_widget_selectAccount.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/etemplate/js/et2_widget_selectAccount.js b/etemplate/js/et2_widget_selectAccount.js index d2f57ecedd..040e9d75c1 100644 --- a/etemplate/js/et2_widget_selectAccount.js +++ b/etemplate/js/et2_widget_selectAccount.js @@ -136,7 +136,7 @@ var et2_selectAccount = et2_selectbox.extend( { this.set_multiple(true, this.options.expand_multiple_rows); } - + if(this.options.multiple) { this._open_multi_search(e); @@ -258,6 +258,11 @@ var et2_selectAccount = et2_selectbox.extend( // Options are not indexed, so we must look for(var i = 0; !found && i < this.options.select_options.length; i++) { + if (typeof this.options.select_options[i] != 'object') + { + egw.debug('warn',this.id + ' wrong option '+i+' this.options.select_options=', this.options.select_options); + continue; + } if(this.options.select_options[i].value == search[j]) found = true; } if(!found)