cvs: pear /MDB_QueryTool/QueryTool Query.php
| From: | Lorenzo Alberton | Date: | Fri, 11 Jun 2004 16:25:24 +0000 |
| Subject: | cvs: pear /MDB_QueryTool/QueryTool Query.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-20520@lists.php.net to get a copy of this message | ||
quipo Fri Jun 11 12:25:24 2004 EDT
Modified files:
/pear/MDB_QueryTool/QueryTool Query.php
Log:
in metadata(), check if $this->db is a valid object, so it won't die when using the class
as a simple query builder
http://cvs.php.net/diff.php/pear/MDB_QueryTool/QueryTool/Query.php?r1=1.31&r2=1.32&ty=u
Index: pear/MDB_QueryTool/QueryTool/Query.php
diff -u pear/MDB_QueryTool/QueryTool/Query.php:1.31 pear/MDB_QueryTool/QueryTool/Query.php:1.32
--- pear/MDB_QueryTool/QueryTool/Query.php:1.31 Sun May 2 11:48:52 2004
+++ pear/MDB_QueryTool/QueryTool/Query.php Fri Jun 11 12:25:24 2004
@@ -15,7 +15,7 @@
// | Author: Lorenzo Alberton <l.alberton at quipo.it> |
// +----------------------------------------------------------------------+
//
-// $Id: Query.php,v 1.31 2004/05/02 15:48:52 quipo Exp $
+// $Id: Query.php,v 1.32 2004/06/11 16:25:24 quipo Exp $
//
// This is just a port of DB_QueryTool, originally written by
// Wolfram Kriesing and Paolo Panto, vision:produktion <wk@visionp.de>
@@ -1499,6 +1499,9 @@
$res[$key]['name'] = $val['COLUMN_NAME'];
}
} else {
+ if (!is_object($this->db)) {
+ return false;
+ }
$res = $this->db->tableinfo($table);
if (MDB::isError($res)) {
$this->_errorSet($res->getUserInfo());