vali 6 年之前
父節點
當前提交
a82a7f5187

+ 2 - 2
vendor/GatewayWorker_linux/GatewayWorker/Applications/whisper/Events.php

@@ -816,9 +816,9 @@ class Events
         }
         $ret = json_decode($ret, true);
 
-        if ($ret && isset($ret['ret']) && $ret['ret'] == 'ok') {
+        if ($ret && isset($ret['ret']) && strtolower($ret['ret']) == 'ok') {
             if (isset($ret['data']) && isset($ret['data']['0']) && isset($ret['data']['1']) && isset($ret['data']['2'])) {
-                return $ret['data']['0'] . '.' . $ret['data']['1'] . '.' . $ret['data']['2'];
+                return trim($ret['data']['0'] . '.' . $ret['data']['1'] . '.' . $ret['data']['2'], '.');
             }
         }
         return '';

+ 2 - 2
vendor/GatewayWorker_windows/Applications/whisper/Events.php

@@ -816,9 +816,9 @@ class Events
         }
         $ret = json_decode($ret, true);
 
-        if ($ret && isset($ret['ret']) && $ret['ret'] == 'ok') {
+        if ($ret && isset($ret['ret']) && strtolower($ret['ret']) == 'ok') {
             if (isset($ret['data']) && isset($ret['data']['0']) && isset($ret['data']['1']) && isset($ret['data']['2'])) {
-                return $ret['data']['0'] . '.' . $ret['data']['1'] . '.' . $ret['data']['2'];
+                return trim($ret['data']['0'] . '.' . $ret['data']['1'] . '.' . $ret['data']['2'], '.');
             }
         }
         return '';