From c1f40560b9dc47e4f250bae91d2b7f0d990f048a Mon Sep 17 00:00:00 2001 From: "Florian (DF2ET)" Date: Fri, 20 Jan 2017 16:00:44 +0100 Subject: [PATCH] Fix PHP error and cancel one strpos call (#92) --- include/functions.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/include/functions.php b/include/functions.php index a0ee98e..dfb41cd 100644 --- a/include/functions.php +++ b/include/functions.php @@ -363,9 +363,10 @@ function getHeardList($logLines, $onlyLast) { $timestamp = substr($logLine, 3, 19); $mode = substr($logLine, 27, strpos($logLine,",") - 27); - $topos = strpos($logLine, "to"); - if ($topos == strpos($logLine, "to follow")) { - $topos = strpos($logLine, "to", strpos($logLine, "to follow)") + 1); + if ($topos = strpos($logLine, "to follow)")) { + $topos = strpos($logLine, "to", $topos+1); + } else { + $topos = strpos($logLine, "to"); } $callsign2 = substr($logLine, strpos($logLine,"from") + 5, $topos - strpos($logLine,"from") - 6); $callsign = $callsign2;