From 4ff7eb76989eadbc54832338ace60e40548e3e5a Mon Sep 17 00:00:00 2001 From: Dan Untenzu Date: Thu, 6 Aug 2020 15:42:13 +0200 Subject: [PATCH] Support locales in ping output Loosen the regex to search for a time value, to support non-english output of the ping command. Since the output is generic in all languages we dont need to look for a specific english term. Refs #5 Refs #49 --- JJG/Ping.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/JJG/Ping.php b/JJG/Ping.php index 001416d..1105f44 100644 --- a/JJG/Ping.php +++ b/JJG/Ping.php @@ -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(?:=|<)(?