From 817b81f900bb135bbc632c2959479053fc70ab6b Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Sun, 12 Feb 2023 19:22:06 +0800 Subject: [PATCH] fix BotCommand regex match argument bug --- src/ZM/Plugin/OneBot12Adapter.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ZM/Plugin/OneBot12Adapter.php b/src/ZM/Plugin/OneBot12Adapter.php index 21df01b7..65cdb5d2 100644 --- a/src/ZM/Plugin/OneBot12Adapter.php +++ b/src/ZM/Plugin/OneBot12Adapter.php @@ -464,6 +464,7 @@ class OneBot12Adapter extends ZMPlugin } // 测试 regex if ($v->regex !== '' && preg_match('/' . $v->regex . '/u', $full_str, $match) !== 0) { + array_shift($match); return [$v, $match, $full_str]; } // 测试 start_with