diff --git a/lynis-report-converter.pl b/lynis-report-converter.pl
index 1c8980c..9ba862e 100755
--- a/lynis-report-converter.pl
+++ b/lynis-report-converter.pl
@@ -1364,10 +1364,14 @@ END
print OUT "\t\t\t\t\t\t
phase 1 plugins enabled: | \n";
print OUT "\t\t\t\t\t\t\t\n";
- foreach my $plug ( sort @{$lynis_report_data{'plugin_enabled_phase1[]'}} ) {
- my ($n,$v) = split(/\|/, $plug);
- if ((!defined($v)) or ($v eq "")) { $v = "AAAAAAAA"; }
- print OUT "\t\t\t\t\t\t\t\tname: | $n | version: | $v | \n";
+ if (exists($lynis_report_data{'plugin_enabled_phase1[]'})) {
+ if (ref($lynis_report_data{'plugin_enabled_phase1[]'}) eq 'ARRAY') {
+ foreach my $plug ( sort @{$lynis_report_data{'plugin_enabled_phase1[]'}} ) {
+ my ($n,$v) = split(/\|/, $plug);
+ if ((!defined($v)) or ($v eq "")) { $v = "AAAAAAAA"; }
+ print OUT "\t\t\t\t\t\t\t\tname: | $n | version: | $v | \n";
+ }
+ }
}
print OUT "\t\t\t\t\t\t\t \n";
print OUT "\t\t\t\t\t\t | \n";