diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index c47be74402..6bff9e4447 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,8 @@ +2012-08-20 Miguel de Dios <miguel.dedios@artica.es> + + * include/functions_html.php: fixed into the function + "html_print_select" when pass a grouped array and try to sort. + 2012-08-20 Miguel de Dios <miguel.dedios@artica.es> * index.php, extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql, diff --git a/pandora_console/include/functions_html.php b/pandora_console/include/functions_html.php index 204763f005..b43850bef4 100644 --- a/pandora_console/include/functions_html.php +++ b/pandora_console/include/functions_html.php @@ -302,7 +302,9 @@ function html_print_select ($fields, $name, $selected = '', $script = '', if (is_array($fields) && !empty ($fields)) { if ($sort !== false) { // Sorting the fields in natural way and case insensitive preserving keys - uasort($fields, "strnatcasecmp"); + $first_elem = reset($fields); + if (!is_array($first_elem)) + uasort($fields, "strnatcasecmp"); } $lastopttype = ''; foreach ($fields as $value => $label) {