From a6f33ba69d22022778f43ac4675bc27700579b22 Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Wed, 8 Dec 2021 21:29:38 +0800 Subject: [PATCH] update to build 430 --- docs/update/build-update.md | 5 ++++ docs/update/v2.md | 7 +++++ src/ZM/ConsoleApplication.php | 4 +-- src/ZM/Module/QQBot.php | 1 - src/ZM/MySQL/MySQLStatement.php | 52 +++++++++++++++++++++++---------- zhamao | 0 6 files changed, 50 insertions(+), 19 deletions(-) mode change 100644 => 100755 zhamao diff --git a/docs/update/build-update.md b/docs/update/build-update.md index 86e9db58..4fbcccf3 100644 --- a/docs/update/build-update.md +++ b/docs/update/build-update.md @@ -4,6 +4,11 @@ 同时此处将只使用 build 版本号进行区分。 +## build 430 (2021-12-8) + +- 删除调试信息 +- 修复 #56 中关于数据库组件的 Bug + ## build 429 (2021-12-7) - 新增配置项 `onebot`.`message_command_policy` diff --git a/docs/update/v2.md b/docs/update/v2.md index 17610773..35c3b072 100644 --- a/docs/update/v2.md +++ b/docs/update/v2.md @@ -1,5 +1,12 @@ # 更新日志(v2 版本) +# v2.6.3 (build 430) + +> 更新时间:2021.12.8 + +- 删除调试信息 +- 修复 #56 中关于数据库组件的 Bug + ## v2.6.2 (build 429) > 更新时间:2021.12.7 diff --git a/src/ZM/ConsoleApplication.php b/src/ZM/ConsoleApplication.php index 5c46be48..cbe88ba4 100644 --- a/src/ZM/ConsoleApplication.php +++ b/src/ZM/ConsoleApplication.php @@ -30,8 +30,8 @@ class ConsoleApplication extends Application { private static $obj = null; - const VERSION_ID = 429; - const VERSION = "2.6.2"; + const VERSION_ID = 430; + const VERSION = "2.6.3"; /** * @throws InitException diff --git a/src/ZM/Module/QQBot.php b/src/ZM/Module/QQBot.php index cf05cfb2..4719b35d 100644 --- a/src/ZM/Module/QQBot.php +++ b/src/ZM/Module/QQBot.php @@ -192,7 +192,6 @@ class QQBot $after->setRuleFunction(function ($v) use ($data) { return $v->cq_event == $data["post_type"]; }); - zm_dump("开始触发!", $data); $after->dispatchEvents($data); return $after; } diff --git a/src/ZM/MySQL/MySQLStatement.php b/src/ZM/MySQL/MySQLStatement.php index d32fd63e..6c929f85 100644 --- a/src/ZM/MySQL/MySQLStatement.php +++ b/src/ZM/MySQL/MySQLStatement.php @@ -17,19 +17,23 @@ class MySQLStatement implements IteratorAggregate, Statement /** @var PDOStatement|PDOStatementProxy */ private $statement; - public function __construct($obj) { + public function __construct($obj) + { $this->statement = $obj; } - public function closeCursor() { + public function closeCursor() + { return $this->statement->closeCursor(); } - public function columnCount() { + public function columnCount() + { return $this->statement->columnCount(); } - public function setFetchMode($fetchMode, $arg2 = null, $arg3 = []) { + public function setFetchMode($fetchMode, $arg2 = null, $arg3 = []) + { if ($arg2 !== null && $arg3 !== []) return $this->statement->setFetchMode($fetchMode, $arg2, $arg3); elseif ($arg2 !== null && $arg3 === []) @@ -40,47 +44,63 @@ class MySQLStatement implements IteratorAggregate, Statement return $this->statement->setFetchMode($fetchMode); } - public function fetch($fetchMode = PDO::FETCH_ASSOC, $cursorOrientation = PDO::FETCH_ORI_NEXT, $cursorOffset = 0) { + public function fetch($fetchMode = PDO::FETCH_ASSOC, $cursorOrientation = PDO::FETCH_ORI_NEXT, $cursorOffset = 0) + { return $this->statement->fetch($fetchMode, $cursorOrientation, $cursorOffset); } - public function fetchAll($fetchMode = PDO::FETCH_ASSOC, $fetchArgument = null, $ctorArgs = null) { - return $this->statement->fetchAll($fetchMode, $fetchArgument, $ctorArgs); + public function fetchAll($fetchMode = PDO::FETCH_ASSOC, $fetchArgument = null, $ctorArgs = null) + { + if ($fetchArgument === null && $ctorArgs === null) + return $this->statement->fetchAll($fetchMode); + elseif ($fetchArgument !== null && $ctorArgs === null) + return $this->statement->fetchAll($fetchMode, $fetchArgument); + else + return $this->statement->fetchAll($fetchMode, $fetchArgument, $ctorArgs); } - public function fetchColumn($columnIndex = 0) { + public function fetchColumn($columnIndex = 0) + { return $this->statement->fetchColumn($columnIndex); } - public function bindValue($param, $value, $type = ParameterType::STRING) { + public function bindValue($param, $value, $type = ParameterType::STRING) + { return $this->statement->bindValue($param, $value, $type); } - public function bindParam($param, &$variable, $type = ParameterType::STRING, $length = null) { + public function bindParam($param, &$variable, $type = ParameterType::STRING, $length = null) + { return $this->statement->bindParam($param, $variable, $type, $length); } - public function errorCode() { + public function errorCode() + { return $this->statement->errorCode(); } - public function errorInfo() { + public function errorInfo() + { return $this->statement->errorInfo(); } - public function execute($params = null) { + public function execute($params = null) + { return $this->statement->execute($params); } - public function rowCount() { + public function rowCount() + { return $this->statement->rowCount(); } - public function getIterator() { + public function getIterator() + { return new StatementIterator($this); } - public function current() { + public function current() + { return $this->statement->current(); } } \ No newline at end of file diff --git a/zhamao b/zhamao old mode 100644 new mode 100755