From eb2bb4d632790c9b9d78f0e727558ab7a9f5f1c1 Mon Sep 17 00:00:00 2001 From: cn Date: Tue, 18 Jan 2022 23:17:42 +0100 Subject: [PATCH] gem: initialize new status attributes with default values - prevents 'undefined method each_with_index for nil:NilClass' errors --- lib/openvpn-status-web/parser/modern_stateless.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/openvpn-status-web/parser/modern_stateless.rb b/lib/openvpn-status-web/parser/modern_stateless.rb index b9dae1c..6861474 100644 --- a/lib/openvpn-status-web/parser/modern_stateless.rb +++ b/lib/openvpn-status-web/parser/modern_stateless.rb @@ -5,7 +5,9 @@ module OpenVPNStatusWeb class ModernStateless def self.parse_status_log(text, sep) status = Status.new + status.client_list_headers = [] status.client_list = [] + status.routing_table_headers = [] status.routing_table = [] status.global_stats = []