Home » Database » MDB2 » Bug #2679
MDB2_Driver_Manager_oci8::listTables() incorrectly defined
Details
| Submitted | 2004-11-03 15:54 UTC |
|---|---|
| From | michael dot caplan at lechateau dot ca |
| Assigned | lsmith |
| Status | Closed |
| Package | MDB2 |
| PHP Version | Irrelevant |
| OS | irrelevant |
| Roadmaps | (Not assigned) |
Comments
[2004-11-03 15:54 UTC] michael dot caplan at lechateau dot ca
Description:
------------
MDB2_Driver_Manager_oci8::listTables() prototype is set to accept a reference of $db. however, the object is not used, nor necissary, and results in a php warning.
should probably be something like this:
// {{{ listTables()
/**
* list all tables in the current database
*
* @return mixed data array on success, a MDB error on failure
* @access public
**/
function listTables()
{
$db =& $GLOBALS['_MDB2_databases'][$this->db_index];
$query = 'SELECT table_name FROM sys.user_tables';
return($db->queryCol($sql));
}
// }}}
[2004-11-03 15:56 UTC] michael dot caplan at lechateau dot ca
actually just found another typo in that block. $sql should be replaced with $query.
function listTables()
{
$db =& $GLOBALS['_MDB2_databases'][$this->db_index];
$query = 'SELECT table_name FROM sys.user_tables';
return($db->queryCol($query));
}
[2004-11-03 16:00 UTC] smith at backendmedia dot com
This bug has been fixed in CVS.
In case this was a documentation problem, the fix will show up at the
end of next Sunday (CET) on pear.php.net.
In case this was a pear.php.net website problem, the change will show
up on the website in short time.
Thank you for the report, and for helping us make PEAR better.
The first bug was still in CVS. The second bug has already been fixed in CVS. Thx for the report.