Diff

plugins/mod_admin_telnet.lua @ 9411:62c876e333e4

mod_admin_telnet: Guard against missing table field
author Kim Alvefur <zash@zash.se>
date Sun, 30 Sep 2018 14:55:39 +0200
parent 9410:7355b2d0067c
child 9454:6780049be177
line wrap: on
line diff
--- a/plugins/mod_admin_telnet.lua	Sun Sep 30 14:55:15 2018 +0200
+++ b/plugins/mod_admin_telnet.lua	Sun Sep 30 14:55:39 2018 +0200
@@ -1328,7 +1328,7 @@
 			table.insert(stat_info.output, s);
 		end
 
-		if data and data.sample_count > 0 then
+		if data and data.sample_count and data.sample_count > 0 then
 			local raw_histogram = require "util.statistics".get_histogram(data);
 
 			local graph_width, graph_height = 50, 10;