Merge pull request #7998 from hregis/6.0_bug

Fix: avoid warning
This commit is contained in:
Laurent Destailleur 2017-12-28 12:53:04 +01:00 committed by GitHub
commit 0abe19c30d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -414,7 +414,7 @@ function ajax_combobox($htmlname, $events=array(), $minLengthToAutocomplete=0, $
if ($forcefocus) $msg.= '.select2(\'focus\')';
$msg.= ';'."\n";
if (count($events)) // If an array of js events to do were provided.
if (is_array($events) && count($events)) // If an array of js events to do were provided.
{
$msg.= '
jQuery("#'.$htmlname.'").change(function () {