From d34aafec6b1e3ee95c5925988bcf9b5ed2d23e8e Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Thu, 24 Mar 2022 13:33:18 +0100 Subject: [PATCH] avoid warnings in error.log when non-defined strings --- pandora_server/lib/PandoraFMS/Tools.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/pandora_server/lib/PandoraFMS/Tools.pm b/pandora_server/lib/PandoraFMS/Tools.pm index 734170b0ff..f712e0b05b 100755 --- a/pandora_server/lib/PandoraFMS/Tools.pm +++ b/pandora_server/lib/PandoraFMS/Tools.pm @@ -1037,6 +1037,7 @@ sub limpia_cadena { ################################################################################ sub clean_blank { my $input = $_[0]; + return $input unless defined($input); $input =~ s/^\s+//g; $input =~ s/\s+$//g; return $input;