diff --git a/htdocs/core/lib/ajax.lib.php b/htdocs/core/lib/ajax.lib.php index 6cd7a0f0381..194dd7c7925 100644 --- a/htdocs/core/lib/ajax.lib.php +++ b/htdocs/core/lib/ajax.lib.php @@ -130,7 +130,10 @@ function ajax_autocompleter($selected, $htmlname, $url, $urloption = '', $minLen $("#search_'.$htmlnamejquery.'").val(item.value); $("#'.$htmlnamejquery.'").val(item.key).trigger("change"); } - var label = item.label.toString(); + var label = ""; + if (item.label != null) { + label = item.label.toString(); + } var update = {}; if (options.update) { $.each(options.update, function(key, value) {