From 044c54da94c929cc6fdfc51adcbe9e9226b75d46 Mon Sep 17 00:00:00 2001 From: BENKE Charlene <1179011+defrance@users.noreply.github.com> Date: Sun, 2 Dec 2018 10:45:37 +0100 Subject: [PATCH 1/2] Warning error if $conf->browser->layout is empty --- htdocs/core/lib/ajax.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/lib/ajax.lib.php b/htdocs/core/lib/ajax.lib.php index afff8198e09..76de6ede2d7 100644 --- a/htdocs/core/lib/ajax.lib.php +++ b/htdocs/core/lib/ajax.lib.php @@ -377,7 +377,7 @@ function ajax_combobox($htmlname, $events=array(), $minLengthToAutocomplete=0, $ // select2 disabled for smartphones with standard browser. // TODO With select2 v4, it seems ok, except that responsive style on table become crazy when scrolling at end of array) - if ($conf->browser->layout == 'phone') return ''; + if (! empty($conf->browser->layout) and $conf->browser->layout == 'phone') return ''; if (! empty($conf->global->MAIN_DISABLE_AJAX_COMBOX)) return ''; if (empty($conf->use_javascript_ajax)) return ''; From ea119a26c7e64ef6729db74af9ae1027b4604a8e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 2 Dec 2018 17:03:11 +0100 Subject: [PATCH 2/2] Update ajax.lib.php --- htdocs/core/lib/ajax.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/lib/ajax.lib.php b/htdocs/core/lib/ajax.lib.php index 76de6ede2d7..e3a0f44c9ac 100644 --- a/htdocs/core/lib/ajax.lib.php +++ b/htdocs/core/lib/ajax.lib.php @@ -377,7 +377,7 @@ function ajax_combobox($htmlname, $events=array(), $minLengthToAutocomplete=0, $ // select2 disabled for smartphones with standard browser. // TODO With select2 v4, it seems ok, except that responsive style on table become crazy when scrolling at end of array) - if (! empty($conf->browser->layout) and $conf->browser->layout == 'phone') return ''; + if (! empty($conf->browser->layout) && $conf->browser->layout == 'phone') return ''; if (! empty($conf->global->MAIN_DISABLE_AJAX_COMBOX)) return ''; if (empty($conf->use_javascript_ajax)) return '';