From 20cb84c1c0bde482283b4c60e5ef4dd376df63d2 Mon Sep 17 00:00:00 2001 From: dataking Date: Tue, 28 Mar 2017 00:36:17 -0700 Subject: [PATCH] minor bug fixes and warning avoidance --- lynis-report-converter.pl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lynis-report-converter.pl b/lynis-report-converter.pl index d31c8e1..75e03f8 100755 --- a/lynis-report-converter.pl +++ b/lynis-report-converter.pl @@ -1241,7 +1241,12 @@ END END - print OUT "\t\t\t

suggestions (".scalar(@{$lynis_report_data{'suggestion[]'}})."):

\n"; + if ((ref($lynis_report_data{'suggestion[]'}) eq 'ARRAY') and + (${$lynis_report_data{'suggestion[]'}}[0] =~ /\|/)) { + print OUT "\t\t\t

suggestions (".scalar(@{$lynis_report_data{'suggestion[]'}})."):

\n"; + } else { + print OUT "\t\t\t

suggestions (0):

\n"; + } print OUT <