From 42b0e148adb6e7129e2f5581e293b2d46fe8fef8 Mon Sep 17 00:00:00 2001 From: dg9vh Date: Sat, 11 Jun 2016 20:36:21 +0000 Subject: [PATCH] hunting undefined offset\[2\] --- include/functions.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/functions.php b/include/functions.php index 4434cd0..bacfb98 100644 --- a/include/functions.php +++ b/include/functions.php @@ -157,8 +157,9 @@ function getHeardList($logLines) { if(strpos($logLine,"end of") || strpos($logLine,"watchdog has expired") || strpos($logLine,"ended RF data") || strpos($logLine,"ended network")) { $lineTokens = explode(", ",$logLine); - - $duration = strtok($lineTokens[2], " "); + if (array_key_exists(2,$lineTokens)) { + $duration = strtok($lineTokens[2], " "); + } if (array_key_exists(3,$lineTokens)) { $loss = $lineTokens[3]; }