From 523b45b406fac6b487a63657f54a3d867c02138a Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Fri, 19 Apr 2013 18:18:16 +0200 Subject: [PATCH] initialize an empty array in disco_sensors --- zabbix_scripts/disco_sensors | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/zabbix_scripts/disco_sensors b/zabbix_scripts/disco_sensors index c50be01..b941d9a 100644 --- a/zabbix_scripts/disco_sensors +++ b/zabbix_scripts/disco_sensors @@ -2,6 +2,7 @@ use JSON; my $json; +@{$json->{data}} = (); open SENSORS, ('){ }; } close SENSORS; -print to_json($json) if (defined $json->{data}); +print to_json($json); exit(0);