Issue Bug Closed

#20687DBAL (adodb): Tables unknown to T3 breaks down Install-Tool

David Bruchmann 06/28/09, 01:23 updated 11/20/09, 21:41

Description

Using Installtool with adodb is hard when unknown tables are in Database.

PHP-Errror-Message:
Fatal Error: Call to a member function MetaType() on a non-object in …\dbal\class.ux_t3lib_db.php on line 1153

Solution (added lines are marked with +):

function MetaType($type,$table,$max_length=-1)    {
$this->lastHandlerKey = $this->handler_getFromTableList($table);
switch((string)$this->handlerCfg[$this->lastHandlerKey][‘type’]) {
case ‘native’:
$str = $type;
break;
case ‘adodb’:
$rs = $this->handlerInstance[$this->lastHandlerKey]->SelectLimit(‘SELECT * FROM ‘.$this->quoteFromTables($table),1);
+ if (in_array($table,$this->cache_fieldType)) {
$str = $rs->MetaType($type, $max_length);
+ }
break;
case ‘userdefined’:
$str = $this->handlerInstance[$this->lastHandlerKey]->MetaType($str,$table,$max_length);
break;
default:
die(‘No handler found!!!’);
break;
}
    return $str;
}

$this->cache_fieldType is build from TCA including loaded extensions even if some tables aren’t loaded (i.e. the dbal-tables).
Until no foreign and unknown tables are recognized by install-tool everything is correct. Added Lines prevent T3 to collapse when other tables are found.

Error occured when trying T3 in MS-Access directly with the dbal-access-driver instead of using a wrapper installation of ms-sql.
(issue imported from #M11436)

Reviews 0

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