diff --git a/var/Typecho/Db/Adapter.php b/var/Typecho/Db/Adapter.php index 6aa4ee17..907b766c 100644 --- a/var/Typecho/Db/Adapter.php +++ b/var/Typecho/Db/Adapter.php @@ -84,10 +84,10 @@ interface Adapter /** * 引号转义函数 * - * @param string $string 需要转义的字符串 + * @param mixed $string 需要转义的字符串 * @return string */ - public function quoteValue(string $string): string; + public function quoteValue($string): string; /** * 对象引号过滤 diff --git a/var/Typecho/Db/Adapter/Mysqli.php b/var/Typecho/Db/Adapter/Mysqli.php index 55d0abc0..5fb62e01 100644 --- a/var/Typecho/Db/Adapter/Mysqli.php +++ b/var/Typecho/Db/Adapter/Mysqli.php @@ -152,10 +152,10 @@ class Mysqli implements Adapter /** * 引号转义函数 * - * @param string $string 需要转义的字符串 + * @param mixed $string 需要转义的字符串 * @return string */ - public function quoteValue(string $string): string + public function quoteValue($string): string { return '\'' . str_replace(['\'', '\\'], ['\'\'', '\\\\'], $string) . '\''; } diff --git a/var/Typecho/Db/Adapter/Pdo.php b/var/Typecho/Db/Adapter/Pdo.php index 349a02e2..649772f9 100644 --- a/var/Typecho/Db/Adapter/Pdo.php +++ b/var/Typecho/Db/Adapter/Pdo.php @@ -151,10 +151,10 @@ abstract class Pdo implements Adapter /** * 引号转义函数 * - * @param string $string 需要转义的字符串 + * @param mixed $string 需要转义的字符串 * @return string */ - public function quoteValue(string $string): string + public function quoteValue($string): string { return $this->object->quote($string); } diff --git a/var/Typecho/Db/Adapter/Pdo/Mysql.php b/var/Typecho/Db/Adapter/Pdo/Mysql.php index 215a9dce..c3f4bd69 100644 --- a/var/Typecho/Db/Adapter/Pdo/Mysql.php +++ b/var/Typecho/Db/Adapter/Pdo/Mysql.php @@ -70,10 +70,10 @@ class Mysql extends Pdo /** * 引号转义函数 * - * @param string $string 需要转义的字符串 + * @param mixed $string 需要转义的字符串 * @return string */ - public function quoteValue(string $string): string + public function quoteValue($string): string { return '\'' . str_replace(['\'', '\\'], ['\'\'', '\\\\'], $string) . '\''; } diff --git a/var/Typecho/Db/Adapter/Pgsql.php b/var/Typecho/Db/Adapter/Pgsql.php index 85033904..1b223148 100644 --- a/var/Typecho/Db/Adapter/Pgsql.php +++ b/var/Typecho/Db/Adapter/Pgsql.php @@ -136,10 +136,10 @@ class Pgsql implements Adapter /** * 引号转义函数 * - * @param string $string 需要转义的字符串 + * @param mixed $string 需要转义的字符串 * @return string */ - public function quoteValue(string $string): string + public function quoteValue($string): string { return '\'' . pg_escape_string($string) . '\''; } diff --git a/var/Typecho/Db/Adapter/SQLite.php b/var/Typecho/Db/Adapter/SQLite.php index 0bc270cb..e3e9df7e 100644 --- a/var/Typecho/Db/Adapter/SQLite.php +++ b/var/Typecho/Db/Adapter/SQLite.php @@ -132,10 +132,10 @@ class SQLite implements Adapter /** * 引号转义函数 * - * @param string $string 需要转义的字符串 + * @param mixed $string 需要转义的字符串 * @return string */ - public function quoteValue(string $string): string + public function quoteValue($string): string { return '\'' . str_replace('\'', '\'\'', $string) . '\''; } diff --git a/var/Typecho/Request.php b/var/Typecho/Request.php index cfb11603..8e99ff42 100644 --- a/var/Typecho/Request.php +++ b/var/Typecho/Request.php @@ -111,6 +111,8 @@ class Request */ public function get(string $key, $default = null, ?bool &$exists = true) { + $exists = true; + switch (true) { case isset($this->params) && isset($this->params[$key]): $value = $this->params[$key]; diff --git a/var/Typecho/Widget/Request.php b/var/Typecho/Widget/Request.php index f421b1ba..751fe396 100644 --- a/var/Typecho/Widget/Request.php +++ b/var/Typecho/Widget/Request.php @@ -101,10 +101,7 @@ class Request /** * 获取实际传递参数(magic) * - * @access public - * * @param string $key 指定参数 - * * @return mixed */ public function __get(string $key) @@ -115,10 +112,7 @@ class Request /** * 判断参数是否存在 * - * @access public - * * @param string $key 指定参数 - * * @return boolean */ public function __isset(string $key)