PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Database » MDB2 » Bug #2679

MDB2_Driver_Manager_oci8::listTables() incorrectly defined

Details

Submitted2004-11-03 15:54 UTC
Frommichael dot caplan at lechateau dot ca
Assignedlsmith
StatusClosed
PackageMDB2
PHP VersionIrrelevant
OSirrelevant
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.