From 018d9ffece2f3e195a7a6c95629b50446c8158be Mon Sep 17 00:00:00 2001 From: Ramon Novoa Date: Wed, 7 Jul 2010 11:38:42 +0000 Subject: [PATCH] 2010-07-07 Ramon Novoa * lib/PandoraFMS/Core.pm: Verify that log4x data is available before trying to read it. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2968 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_server/ChangeLog | 5 +++++ pandora_server/lib/PandoraFMS/Core.pm | 1 + 2 files changed, 6 insertions(+) diff --git a/pandora_server/ChangeLog b/pandora_server/ChangeLog index 8291daf316..9dab56b704 100644 --- a/pandora_server/ChangeLog +++ b/pandora_server/ChangeLog @@ -1,3 +1,8 @@ +2010-07-07 Ramon Novoa + + * lib/PandoraFMS/Core.pm: Verify that log4x data is available + before trying to read it. + 2010-07-06 Dario Rodriguez * lib/PandoraFMS/Core.pm, ReconServer.pm, DataServer.pm: Delete diff --git a/pandora_server/lib/PandoraFMS/Core.pm b/pandora_server/lib/PandoraFMS/Core.pm index a7d4b846af..e15c9c7047 100644 --- a/pandora_server/lib/PandoraFMS/Core.pm +++ b/pandora_server/lib/PandoraFMS/Core.pm @@ -1493,6 +1493,7 @@ sub log4x_get_severity_num($) { my ($dataObject) = @_; my $data = $dataObject->{'severity'}; + return undef unless defined ($data); # The severity is a word, so we need to translate to numbers if ($data =~ m/^trace$/i) {