From cedba012b9b8966b116cdee304fbc8549f0612c1 Mon Sep 17 00:00:00 2001 From: Anyon Date: Sat, 12 Dec 2020 14:25:42 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=96=87=E4=BB=B6=E5=9B=9E?= =?UTF-8?q?=E5=A4=8D=E8=A7=84=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/wechat/controller/api/Push.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/wechat/controller/api/Push.php b/app/wechat/controller/api/Push.php index 6359de13c..6b7a49a9e 100644 --- a/app/wechat/controller/api/Push.php +++ b/app/wechat/controller/api/Push.php @@ -196,8 +196,8 @@ class Push extends Controller */ private function _keys(string $rule, bool $last = false, bool $custom = false) { - if (stripos($rule, 'WechatKeys#keys#reply#text:') === 0) { - [, $content] = explode('WechatKeys#keys#reply#text:', $rule); + if (is_numeric(stripos($rule, '#reply#text:'))) { + [, $content] = explode('#reply#text:', $rule); return $this->_buildMessage('text', ['Content' => $content]); } [$table, $field, $value] = explode('#', $rule . '##'); @@ -323,7 +323,7 @@ class Push extends Controller * @param array $data * @return array */ - private function _arrayChangeKeyCase(array $data) + private function _arrayChangeKeyCase(array $data): array { $data = array_change_key_case($data, CASE_LOWER); foreach ($data as $key => $vo) if (is_array($vo)) {