Issue Bug Closed

#17916Ext Manager doesn't work with dbal SVN 0.9.20

Moreno Feltscher 12/13/07, 13:10 updated 10/05/09, 18:05

Description

I’m using dbal SVN-version 0.9.20 (because of the CLOB-features) with Oracle 10g. The error only occurs in this version, with 0.9.9 all worked fine.

Fatal error: Call to a member function MetaType() on a non-object in *\typo3\sysext\dbal\class.ux_t3lib_db.php on line 1140
That’s line 1140:
$str = $rs->MetaType($type, $max_length);

If found out, sometimes $rs is NULL, but I don’t know why.. $rs is set like this:
$rs = $this->handlerInstance[$this->lastHandlerKey]->SelectLimit(‘SELECT * FROM ‘.$this->quoteFromTables($table),1);

So i produced a workaround:
$rs = $this->handlerInstance[$this->lastHandlerKey]->SelectLimit(‘SELECT * FROM ‘.$this->quoteFromTables($table),1);
if ($rs != NULL) $str = $rs->MetaType($type, $max_length);

Now this error occurs:
Fatal error: Call to a member function FetchRow() on a non-object in *\typo3\sysext\adodb\adodb\drivers\adodb-oci8.inc.php on line 348

Exactly the same problem (line 348):
if ($row = $rs->FetchRow())
$primary_key = $row1; //constraint_name

$rs is defined like this:
$rs = $this->Execute(sprintf(“SELECT * FROM ALL_CONSTRAINTS WHERE UPPER=’%s’ AND CONSTRAINT_TYPE=‘P’”,$table));

So, i also produced a workaround like this:
$rs = $this->Execute(sprintf(“SELECT * FROM ALL_CONSTRAINTS WHERE UPPER=’%s’ AND CONSTRAINT_TYPE=‘P’”,$table));
if (($rs != NULL)&&($row = $rs->FetchRow()))
$primary_key = $row1; //constraint_name

Now everything works fine, but I don’t think thats a good solution for this.

It would be nice to know where $table comes from.. can anybody help me?

(issue imported from #M6946)

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.