From a09cf8d3a1ed76c8d5db882e462292f9d321a75a Mon Sep 17 00:00:00 2001 From: thinkphp Date: Sun, 12 Jun 2016 17:17:21 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3Oracle=E9=A9=B1=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/Db.php | 2 +- library/think/db/connector/Oracle.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/library/think/Db.php b/library/think/Db.php index 4331be12..a75764b7 100644 --- a/library/think/Db.php +++ b/library/think/Db.php @@ -70,7 +70,7 @@ class Db // 解析连接参数 支持数组和字符串 $options = self::parseConfig($config); if (empty($options['type'])) { - throw new Exception('db type error'); + throw new \InvalidArgumentException('db type error'); } $class = (!empty($options['namespace']) ? $options['namespace'] : '\\think\\db\\connector\\') . ucwords($options['type']); // 记录初始化信息 diff --git a/library/think/db/connector/Oracle.php b/library/think/db/connector/Oracle.php index 19954ecc..7e067aea 100644 --- a/library/think/db/connector/Oracle.php +++ b/library/think/db/connector/Oracle.php @@ -125,10 +125,10 @@ class Oracle extends Connection /** * 取得数据库的表信息(暂时实现取得用户表信息) * @access public + * @param string $dbName * @return array - * @internal param string $dbName */ - public function getTables() + public function getTables($dbName = '') { $pdo = $this->linkID->query("select table_name from all_tables"); $result = $pdo->fetchAll(PDO::FETCH_ASSOC);