From 0e57591001f43c0721a5f95f7a9e53451f4b5869 Mon Sep 17 00:00:00 2001 From: jim-p Date: Mon, 12 Sep 2011 13:50:36 -0400 Subject: Declare this array before use, otherwise if no commands are found the implode() below the loop will fail. (nrpe2) --- config/nrpe2/nrpe2.inc | 1 + 1 file changed, 1 insertion(+) diff --git a/config/nrpe2/nrpe2.inc b/config/nrpe2/nrpe2.inc index 3bc97b21..2d136c3a 100644 --- a/config/nrpe2/nrpe2.inc +++ b/config/nrpe2/nrpe2.inc @@ -143,6 +143,7 @@ function nrpe2_custom_php_write_config() { global $g, $config, $nagios_check_path; conf_mount_rw(); + $cmds = array(); foreach ($config['installedpackages']['nrpe2']['config'][0]['row'] as $cmd) { if (is_executable("{$nagios_check_path}/{$cmd['command']}")) $cmds[] = "command[{$cmd['name']}]={$nagios_check_path}/{$cmd['command']} -w {$cmd['warning']} -c {$cmd['critical']} {$cmd['extra']}\n"; -- cgit v1.2.3