hunting Undefined offset

This commit is contained in:
dg9vh 2016-05-25 13:44:49 +00:00
parent f4d5c16486
commit 09e8c929d1

View file

@ -133,7 +133,9 @@ function getHeardList($logLines) {
$lineTokens = explode(", ",$logLine);
$duration = strtok($lineTokens[2], " ");
if (array_key_exists(3,$lineTokens)) {
$loss = $lineTokens[3];
}
// if RF-Packet, no LOSS would be reported, so BER is in LOSS position
if (startsWith($loss,"BER")) {
@ -141,8 +143,10 @@ function getHeardList($logLines) {
$loss = "";
} else {
$loss = strtok($loss, " ");
if (array_key_exists(4,$lineTokens)) {
$ber = substr($lineTokens[4], 5);
}
}
if (strpos($logLine,"ended RF data") || strpos($logLine,"ended network")) {
switch (substr($logLine, 27, strpos($logLine,",") - 27)) {