Fix PHP error and cancel one strpos call (#92)
This commit is contained in:
parent
de526e6127
commit
c1f40560b9
1 changed files with 4 additions and 3 deletions
|
@ -363,9 +363,10 @@ function getHeardList($logLines, $onlyLast) {
|
||||||
|
|
||||||
$timestamp = substr($logLine, 3, 19);
|
$timestamp = substr($logLine, 3, 19);
|
||||||
$mode = substr($logLine, 27, strpos($logLine,",") - 27);
|
$mode = substr($logLine, 27, strpos($logLine,",") - 27);
|
||||||
|
if ($topos = strpos($logLine, "to follow)")) {
|
||||||
|
$topos = strpos($logLine, "to", $topos+1);
|
||||||
|
} else {
|
||||||
$topos = strpos($logLine, "to");
|
$topos = strpos($logLine, "to");
|
||||||
if ($topos == strpos($logLine, "to follow")) {
|
|
||||||
$topos = strpos($logLine, "to", strpos($logLine, "to follow)") + 1);
|
|
||||||
}
|
}
|
||||||
$callsign2 = substr($logLine, strpos($logLine,"from") + 5, $topos - strpos($logLine,"from") - 6);
|
$callsign2 = substr($logLine, strpos($logLine,"from") + 5, $topos - strpos($logLine,"from") - 6);
|
||||||
$callsign = $callsign2;
|
$callsign = $callsign2;
|
||||||
|
|
Loading…
Reference in a new issue