diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 21f84a100a..dce5564022 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,10 @@ +2010-09-27 Sergio Martin + + * godmode/reporting/graph_builder.graph_editor.php + godmode/reporting/graph_builder.preview.php: Fixed few + foreach loops to avoid notices setting empty array to + false variables + 2010-09-27 Raúl Mateos * godmode/users/user_list.php, godmode/users/configure_user.php: diff --git a/pandora_console/godmode/reporting/graph_builder.graph_editor.php b/pandora_console/godmode/reporting/graph_builder.graph_editor.php index 63a32f8d08..ddfb3d1067 100644 --- a/pandora_console/godmode/reporting/graph_builder.graph_editor.php +++ b/pandora_console/godmode/reporting/graph_builder.graph_editor.php @@ -51,6 +51,10 @@ if ($editGraph) { $weight_array = array(); $agent_array = array(); + if($graphRows === false) { + $graphRows = array(); + } + foreach ($graphRows as $graphRow) { $idgs_array[] = $graphRow['id_gs']; $module_array[] = $graphRow['id_agent_module']; diff --git a/pandora_console/godmode/reporting/graph_builder.preview.php b/pandora_console/godmode/reporting/graph_builder.preview.php index 005c620787..50565d180f 100644 --- a/pandora_console/godmode/reporting/graph_builder.preview.php +++ b/pandora_console/godmode/reporting/graph_builder.preview.php @@ -72,6 +72,10 @@ $module_array = array(); $weight_array = array(); $agent_array = array(); +if($graphRows === false) { + $graphRows = array(); +} + foreach ($graphRows as $graphRow) { $module_array[] = $graphRow['id_agent_module']; $weight_array[] = $graphRow['weight'];