Actions
Bug #20687
closedDBAL (adodb): Tables unknown to T3 breaks down Install-Tool
Status:
Closed
Priority:
Should have
Assignee:
Category:
Database API (Doctrine DBAL)
Target version:
-
Start date:
2009-06-28
Due date:
% Done:
0%
Estimated time:
TYPO3 Version:
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:
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)
Files
Actions