diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index e942f92a17..2dba55e8e0 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,9 @@ +2010-04-28 Sergio Martin + + * include/functions_visual_map.php: fixed the + error of divided by zero and now the widget + display an error message. Bug #2992370 + 2010-04-28 Sancho Lerena * include/pChart/pData.class, diff --git a/pandora_console/include/functions_visual_map.php b/pandora_console/include/functions_visual_map.php index 1f5329b6eb..b7d88201dd 100644 --- a/pandora_console/include/functions_visual_map.php +++ b/pandora_console/include/functions_visual_map.php @@ -330,6 +330,11 @@ function print_pandora_visual_map ($id_layout, $show_links = true, $draw_lines = global $config; $layout = get_db_row ('tlayout', 'id', $id_layout); + if(($layout["width"] == 0)){ + print_error_message (__('The map has not elements')); + $layout["width"] = 1; + } + $resizedMap = false; $proportion = 1; if (!is_null($width)) {