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], " ");
|
||||||
|
if (array_key_exists(3,$lineTokens)) {
|
||||||
$loss = $lineTokens[3];
|
$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,8 +143,10 @@ function getHeardList($logLines) {
|
||||||
$loss = "";
|
$loss = "";
|
||||||
} else {
|
} else {
|
||||||
$loss = strtok($loss, " ");
|
$loss = strtok($loss, " ");
|
||||||
|
if (array_key_exists(4,$lineTokens)) {
|
||||||
$ber = substr($lineTokens[4], 5);
|
$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")) {
|
||||||
switch (substr($logLine, 27, strpos($logLine,",") - 27)) {
|
switch (substr($logLine, 27, strpos($logLine,",") - 27)) {
|
||||||
|
|
Loading…
Reference in a new issue