From 35e66d384ddb3f5fe5ff76684372b0e196d26bcf Mon Sep 17 00:00:00 2001 From: zarzuelo Date: Mon, 27 Sep 2010 10:23:04 +0000 Subject: [PATCH] 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 git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3303 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 7 +++++++ .../godmode/reporting/graph_builder.graph_editor.php | 4 ++++ .../godmode/reporting/graph_builder.preview.php | 4 ++++ 3 files changed, 15 insertions(+) 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'];