改进一处 错误

This commit is contained in:
thinkphp
2016-04-27 16:49:36 +08:00
parent 00cd2e61d9
commit 0b104d2b49
2 changed files with 7 additions and 2 deletions

View File

@@ -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'];
}

View File

@@ -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)) {