From eb950663e733f697dd2b8fa15d38f1899ec57604 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=80=97=E5=AD=90?= Date: Tue, 10 Jun 2025 11:09:39 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E9=94=99=E8=AF=AF=E4=BF=A1?= =?UTF-8?q?=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/utils/CheckUtils.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/utils/CheckUtils.php b/app/utils/CheckUtils.php index e0ac27c..7ef2806 100644 --- a/app/utils/CheckUtils.php +++ b/app/utils/CheckUtils.php @@ -83,6 +83,13 @@ class CheckUtils } catch (GuzzleException $e) { $status = false; $errmsg = $e->getMessage(); + if (preg_match('/^cURL error \d+: /', $errmsg)) { + $errmsg = preg_replace('/^cURL error \d+: /', '', $errmsg); + } + $errmsg = str_replace(' (see https://curl.haxx.se/libcurl/c/libcurl-errors.html)', '', $errmsg); + if (strlen($errmsg) > 100) { + $errmsg = substr($errmsg, 0, 97) . '...'; + } } $usetime = round((microtime(true) - $start) * 1000);