From 2ea5dd1dce6c866dc760ed5521365873a01742fe Mon Sep 17 00:00:00 2001 From: darode Date: Fri, 29 Jul 2011 11:15:39 +0000 Subject: [PATCH] 2011-07-29 Dario Rodriguez * include/functions_agents.php: Fixed a bug related to wrong value for a foreach function. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4652 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 5 +++++ pandora_console/include/functions_agents.php | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index e00aa3d4b0..33bc64ba08 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,8 @@ +2011-07-29 Dario Rodriguez + + * include/functions_agents.php: Fixed a bug related to + wrong value for a foreach function. + 2011-07-28 Sergio Martin * include/functions_networkmap.php: Added new mode to diff --git a/pandora_console/include/functions_agents.php b/pandora_console/include/functions_agents.php index 566cfa9c4b..f3fa90bb7a 100644 --- a/pandora_console/include/functions_agents.php +++ b/pandora_console/include/functions_agents.php @@ -920,6 +920,10 @@ function agents_get_modules ($id_agent = null, $details = false, $filter = false $sql = "SELECT id_agente FROM tagente WHERE id_grupo IN (" . implode(',', $id_groups) . ")"; $id_agent = db_get_all_rows_sql($sql); + if($id_agent == false) { + $id_agent = array(); + } + $temp = array(); foreach ($id_agent as $item) { $temp[] = $item['id_agente'];