From eb2d4e5de71bb3e696bc1b4e1e9cf0d395194259 Mon Sep 17 00:00:00 2001 From: "jose.gonzalez@pandorafms.com" Date: Wed, 2 Nov 2022 15:41:05 +0100 Subject: [PATCH] Fix --- pandora_server/lib/PandoraFMS/Core.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandora_server/lib/PandoraFMS/Core.pm b/pandora_server/lib/PandoraFMS/Core.pm index 26cdd00d4e..e2dbcf4952 100644 --- a/pandora_server/lib/PandoraFMS/Core.pm +++ b/pandora_server/lib/PandoraFMS/Core.pm @@ -114,7 +114,9 @@ use Encode; use Encode::CN; use XML::Simple; use HTML::Entities; +use Tie::File; use Time::Local; +use Time::Piece; use Time::HiRes qw(time); eval "use POSIX::strftime::GNU;1" if ($^O =~ /win/i); use POSIX qw(strftime); @@ -7211,8 +7213,6 @@ sub pandora_snmptrapd_still_working ($$) { ORDER BY timestamp DESC LIMIT 1'); # Read the last log file line. - use Tie::File; - use Time::Piece; my $snmptrapdFile = $pa_config->{'snmp_logfile'}; tie my @snmptrapdFileComplete, 'Tie::File', $snmptrapdFile; my $lastTimestampLogFile = $snmptrapdFileComplete[-1];