diff --git a/library/think/db/Query.php b/library/think/db/Query.php index 31ae15fd..bd9ffec0 100644 --- a/library/think/db/Query.php +++ b/library/think/db/Query.php @@ -853,7 +853,9 @@ class Query { if (empty($this->options['table'])) { $tableName = $this->connection->getConfig('prefix'); - $tableName .= Loader::parseName($this->options['name']); + if (isset($this->options['name'])) { + $tableName .= Loader::parseName($this->options['name']); + } } else { $tableName = $this->options['table']; } diff --git a/library/traits/think/Instance.php b/library/traits/think/Instance.php index 07aa45da..d85975b3 100644 --- a/library/traits/think/Instance.php +++ b/library/traits/think/Instance.php @@ -15,7 +15,10 @@ trait Instance { protected static $instance = null; - // 实例化(单例) + /** + * @param array $options + * @return static + */ public static function instance($options = []) { if (is_null(self::$instance)) {