From 091751eccc61f1833ec944a1099d11cc1dea5d6e Mon Sep 17 00:00:00 2001
From: mdtrooper <tres.14159@gmail.com>
Date: Thu, 23 Dec 2010 16:14:59 +0000
Subject: [PATCH] 2010-12-23  Miguel de Dios  <miguel.dedios@artica.es>

	* include/functions_agents.php: fixed when the filter stanby not exist.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3703 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
---
 pandora_console/ChangeLog                    | 4 ++++
 pandora_console/include/functions_agents.php | 7 ++++++-
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog
index f418821946..45c8b74991 100644
--- a/pandora_console/ChangeLog
+++ b/pandora_console/ChangeLog
@@ -1,3 +1,7 @@
+2010-12-23  Miguel de Dios  <miguel.dedios@artica.es>
+
+	* include/functions_agents.php: fixed when the filter stanby not exist.
+
 2010-12-23  Miguel de Dios  <miguel.dedios@artica.es>
 
 	* include/functions.php: in function "check_sql" added some changes in
diff --git a/pandora_console/include/functions_agents.php b/pandora_console/include/functions_agents.php
index 1b34e8a60f..4a1ccb1767 100644
--- a/pandora_console/include/functions_agents.php
+++ b/pandora_console/include/functions_agents.php
@@ -114,7 +114,12 @@ function get_agent_alerts_simple ($id_agent = false, $filter = '', $options = fa
 	
 	if (is_array($filter)) {
 		$disabled = $filter['disabled'];
-		$filter = ' AND talert_template_modules.standby = "'.$filter['standby'].'"';
+		if (isset($filter['standby'])) {
+			$filter = ' AND talert_template_modules.standby = "'.$filter['standby'].'"';
+		}
+		else {
+			$filter = '';
+		}
 	}
 	else {
 		$filter = '';