2010-10-07 Sancho Lerena <slerena@artica.es>

* godmode/alerts/alert_list.list.php: Another ugly warning fixed due 
        an undefined array. PLEASE dont use foreach on arrays non-checked !




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3366 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
slerena 2010-10-07 15:18:51 +00:00
parent 24dd478a46
commit 7109acb41a
2 changed files with 10 additions and 2 deletions

View File

@ -1,5 +1,8 @@
2010-10-07 Sancho Lerena <slerena@artica.es>
* godmode/alerts/alert_list.list.php: Another ugly warning fixed due
an undefined array. PLEASE dont use foreach on arrays non-checked !
* godmode/agentes/configurar_agente.php: Added custom fields to the global
edit/insert code. Not really used here, but for the future.

View File

@ -44,9 +44,14 @@ $form_filter .= print_input_text ('template_name', $templateName, '', 12, 255, t
$form_filter .= "</td>\n";
$temp = get_agents();
$arrayAgents = array();
foreach ($temp as $agentElement) {
$arrayAgents[$agentElement['id_agente']] = $agentElement['nombre'];
# Avoid empty arrays, warning messages are UGLY !
if ($temp){
foreach ($temp as $agentElement) {
$arrayAgents[$agentElement['id_agente']] = $agentElement['nombre'];
}
}
$form_filter .= "<td>".__('Agents')."</td><td>";
$form_filter .= print_input_text_extended ('agent_name', $agentName, 'text-agent_name', '', 12, 100, false, '',
array('style' => 'background: url(images/lightning.png) no-repeat right;'), true);