hunting Undefined offset
This commit is contained in:
parent
f4d5c16486
commit
09e8c929d1
1 changed files with 6 additions and 2 deletions
|
@ -133,7 +133,9 @@ function getHeardList($logLines) {
|
||||||
$lineTokens = explode(", ",$logLine);
|
$lineTokens = explode(", ",$logLine);
|
||||||
|
|
||||||
$duration = strtok($lineTokens[2], " ");
|
$duration = strtok($lineTokens[2], " ");
|
||||||
$loss = $lineTokens[3];
|
if (array_key_exists(3,$lineTokens)) {
|
||||||
|
$loss = $lineTokens[3];
|
||||||
|
}
|
||||||
|
|
||||||
// if RF-Packet, no LOSS would be reported, so BER is in LOSS position
|
// if RF-Packet, no LOSS would be reported, so BER is in LOSS position
|
||||||
if (startsWith($loss,"BER")) {
|
if (startsWith($loss,"BER")) {
|
||||||
|
@ -141,7 +143,9 @@ function getHeardList($logLines) {
|
||||||
$loss = "";
|
$loss = "";
|
||||||
} else {
|
} else {
|
||||||
$loss = strtok($loss, " ");
|
$loss = strtok($loss, " ");
|
||||||
$ber = substr($lineTokens[4], 5);
|
if (array_key_exists(4,$lineTokens)) {
|
||||||
|
$ber = substr($lineTokens[4], 5);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strpos($logLine,"ended RF data") || strpos($logLine,"ended network")) {
|
if (strpos($logLine,"ended RF data") || strpos($logLine,"ended network")) {
|
||||||
|
|
Loading…
Reference in a new issue