Fix testconfig.pl error printing. (#1975)

Use number of keys instead of size(hash)
This commit is contained in:
Peter Gebruers 2019-10-14 05:23:37 +02:00 committed by Justin Hammond
parent 85ca5769a5
commit d0e48bf554

View file

@ -417,8 +417,9 @@ sub CheckSensorMultiLevelCCTypes {
sub PrettyPrintErrors() {
if (length(%errors) > 0) {
print "\n\nErrors: (Please Correct before Submitting to OZW)\n";
my $number_of_errors = keys %errors;
if ($number_of_errors > 0) {
print "\n\nErrors: ", $number_of_errors, ". (Please Correct before Submitting to OZW)\n";
while ((my $key, my $value) = each %errors)
{
foreach my $detail (@{$value})