diff --git a/library/think/Db.php b/library/think/Db.php index 5b6f2334..3c45bf7c 100644 --- a/library/think/Db.php +++ b/library/think/Db.php @@ -41,7 +41,7 @@ class Db if (empty($options['type'])) { throw new Exception('db type error'); } - $class = !empty($options['namespace']) ? $options['namespace'] : '\\think\\db\\driver\\') . ucwords($options['type']; + $class = (!empty($options['namespace']) ? $options['namespace'] : '\\think\\db\\driver\\') . ucwords($options['type']); self::$instances[$md5] = new $class($options); } self::$instance = self::$instances[$md5];