PEAR is archived and read-only

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

Home » Database » DB » Bug #4024

Cannot use object of type DB_Error as array

Details

Submitted2005-04-01 13:38 UTC
Fromjacquem at lapp dot in2p3 dot fr
Assigneddanielc
StatusBogus
PackageDB
PHP Version5.0.3
OSScientific Linux 3.0.3
Roadmaps(Not assigned)

Comments

[2005-04-01 13:38 UTC] jacquem at lapp dot in2p3 dot fr

Description:
------------
I upgrade php from 4.1.2 to 5.0.3, I install the PEAR DB module version 1.7.4 since it is not include with php version 5.

I now got a php fatal error:

PHP Fatal error: Call to undefined method BB_Error::fetchRow()

Reproduce code:
---------------
function sess_read($key) {
global $db, $SESS_LIFE;

$qry = "SELECT session_vars FROM auth_session WHERE session_key = '$key'";
$qid = $db->query($qry);
$value = '';
if ($row = $qid->fetchRow()) {
$value = $row[session_vars];
}

return $value;
}

Expected result:
----------------
Something working

Actual result:
--------------
PHP Fatal error: Call to undefined method BB_Error::fetchRow() in apache log error file