Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions JJG/Ping.php
Original file line number Diff line number Diff line change
Expand Up @@ -245,8 +245,8 @@ private function pingExec() {

// If the result line in the output is not empty, parse it.
if (!empty($output[1])) {
// Search for a 'time' value in the result line.
$response = preg_match("/time(?:=|<)(?<time>[\.0-9]+)(?:|\s)ms/", $output[1], $matches);
// Search for a time value in the result line.
$response = preg_match("/(?:\w=|\w<)(?<time>[\.0-9]+)(?:|\s)ms/", $output[1], $matches);

// If there's a result and it's greater than 0, return the latency.
if ($response > 0 && isset($matches['time'])) {
Expand Down