From 03cbebaef25348be5a637fe75c173a97df623bab Mon Sep 17 00:00:00 2001 From: slerena Date: Thu, 28 Feb 2013 14:21:15 +0000 Subject: [PATCH] 2013-02-28 Sancho Lerena * lib/PandoraFMS/PluginServer.pm: Removed several "Use of uninitialized value in string" errors. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7747 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_server/ChangeLog | 5 +++++ pandora_server/lib/PandoraFMS/PluginServer.pm | 12 ++++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/pandora_server/ChangeLog b/pandora_server/ChangeLog index b2d02a20ab..1b6e534315 100644 --- a/pandora_server/ChangeLog +++ b/pandora_server/ChangeLog @@ -1,3 +1,8 @@ +2013-02-28 Sancho Lerena + + * lib/PandoraFMS/PluginServer.pm: Removed several "Use of uninitialized i + value in string" errors. + 2013-02-28 Ramon Novoa * bin/pandora_server: Undid the previous commit since forking after diff --git a/pandora_server/lib/PandoraFMS/PluginServer.pm b/pandora_server/lib/PandoraFMS/PluginServer.pm index 7a8827999f..587ea45b03 100644 --- a/pandora_server/lib/PandoraFMS/PluginServer.pm +++ b/pandora_server/lib/PandoraFMS/PluginServer.pm @@ -152,9 +152,17 @@ sub data_consumer ($$) { # Build command to execute my $command = $plugin->{'execute'}; - + + if (!defined($plugin->{'parameters'})){ + $plugin->{'parameters'} = ""; + } + my $parameters = $plugin->{'parameters'}; - + + if (!defined($module->{'macros'})){ + $module->{'macros'} = ""; + } + # Macros eval { if ($module->{'macros'} ne '') {