Fixed PHP warning.

This commit is contained in:
mdtrooper 2014-09-10 18:21:45 +02:00
parent 875a65d633
commit afcab1836f
1 changed files with 9 additions and 4 deletions

View File

@ -312,6 +312,11 @@ $table_advanced->data[1][3] = __('Unit');
$table_advanced->data[1][4] = html_print_input_text ('unit', $unit,
'', 20, 65, true);
$module_id_policy_module = 0;
if (isset($module['id_policy_module'])) {
$module_id_policy_module = $module['id_policy_module'];
}
// In the data modules, the interval is not in seconds. It is a factor
// to be multiplied for the agent interval
if ($moduletype == MODULE_DATA) {
@ -333,7 +338,7 @@ if ($moduletype == MODULE_DATA) {
$table_advanced->data[2][1] = sprintf(__('Default') . ': 1' , $interval_factor) . ui_print_help_icon ('module_interval_factor', true);
$table_advanced->data[2][1] .= html_print_input_hidden('module_interval', $interval_factor, true);
}
else if ($module['id_policy_module'] != 0) {
else if ($module_id_policy_module != 0) {
$table_advanced->data[2][1] .= ui_print_help_tip(__('The policy modules of data type will only update their intervals when policy is applied.'), true);
}