From 97730f0002f9fdfb1e9c993cd858fe821dc46805 Mon Sep 17 00:00:00 2001 From: "Timothy J. Warren" Date: Mon, 17 Mar 2014 19:45:41 -0400 Subject: [PATCH] Fix some code quality issues --- drivers/firebird/firebird_driver.php | 6 +++--- drivers/mysql/mysql_util.php | 2 +- drivers/sqlite/sqlite_driver.php | 1 - 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/firebird/firebird_driver.php b/drivers/firebird/firebird_driver.php index 866ead7..427752d 100644 --- a/drivers/firebird/firebird_driver.php +++ b/drivers/firebird/firebird_driver.php @@ -72,7 +72,7 @@ class Firebird extends DB_PDO { } // Throw an exception to make this match other pdo classes - if ( ! is_resource($this->conn)) throw new PDOException(fbird_errmsg(), fbird_errcode()); + if ( ! is_resource($this->conn)) throw new PDOException(fbird_errmsg(), fbird_errcode(), NULL); // Load these classes here because this // driver does not call the constructor @@ -121,7 +121,7 @@ class Firebird extends DB_PDO { // Throw the error as a exception $err_string = fbird_errmsg() . "Last query:" . $this->last_query; - if ($this->statement_link === FALSE) throw new PDOException($err_string, fbird_errcode()); + if ($this->statement_link === FALSE) throw new PDOException($err_string, fbird_errcode(), NULL); $this->statement = new FireBird_Result($this->statement_link); @@ -143,7 +143,7 @@ class Firebird extends DB_PDO { $this->statement_link = fbird_prepare($this->conn, $query); // Throw the error as an exception - if ($this->statement_link === FALSE) throw new PDOException(fbird_errmsg(), fbird_errcode()); + if ($this->statement_link === FALSE) throw new PDOException(fbird_errmsg(), fbird_errcode(), NULL); $this->statement = new FireBird_Result($this->statement_link); diff --git a/drivers/mysql/mysql_util.php b/drivers/mysql/mysql_util.php index 7005d4a..c158558 100644 --- a/drivers/mysql/mysql_util.php +++ b/drivers/mysql/mysql_util.php @@ -19,7 +19,7 @@ * @package Query * @subpackage Drivers * @method array get_dbs() - * @method mixed driver_query(string $sql) + * @method mixed driver_query(string $sql, bool $filtered_index) * @method array get_system_tables() * @method array get_tables() * @method mixed query(string $sql) diff --git a/drivers/sqlite/sqlite_driver.php b/drivers/sqlite/sqlite_driver.php index 34a7c86..318062a 100644 --- a/drivers/sqlite/sqlite_driver.php +++ b/drivers/sqlite/sqlite_driver.php @@ -68,7 +68,6 @@ class SQLite extends DB_PDO { */ public function get_tables() { - $tables = array(); $sql = $this->sql->table_list(); $res = $this->query($sql);