Fixed bug #11436: Unknown tables break Install-Tool (Thanks to David Bruchmann)
authorXavier Perseguers <typo3@perseguers.ch>
Fri, 4 Sep 2009 08:29:20 +0000 (08:29 +0000)
committerXavier Perseguers <typo3@perseguers.ch>
Fri, 4 Sep 2009 08:29:20 +0000 (08:29 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Extensions/dbal/trunk@23990 735d13b6-9817-0410-8766-e36946ffe9aa

typo3/sysext/dbal/ChangeLog
typo3/sysext/dbal/class.ux_t3lib_db.php

index a9f0114..614a182 100644 (file)
@@ -1,3 +1,7 @@
+2009-09-03  Xavier Perseguers  <typo3@perseguers.ch>
+
+       * Fixed bug #11436: Unknown tables break Install-Tool (Thanks to David Bruchmann)
+
 2008-02-04  Michael Stucki  <michael@typo3.org>
 
        * Fixed bug #7295: Uninitialized variable in ->handler_getFromTableList() (Patch by Oliver Klee)
index a00dce8..b38dc9b 100644 (file)
@@ -1127,13 +1127,16 @@ class ux_t3lib_DB extends t3lib_DB {
         */
        function MetaType($type,$table,$max_length=-1)  {
                $this->lastHandlerKey = $this->handler_getFromTableList($table);
+               $str = '';
                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);
-                               $str = $rs->MetaType($type, $max_length);
+                               if (in_array($table, $this->cache_fieldType)) {
+                                       $rs = $this->handlerInstance[$this->lastHandlerKey]->SelectLimit('SELECT * FROM ' . $this->quoteFromTables($table), 1);
+                                       $str = $rs->MetaType($type, $max_length);
+                               }
                                break;
                        case 'userdefined':
                                $str = $this->handlerInstance[$this->lastHandlerKey]->MetaType($str,$table,$max_length);
@@ -2707,4 +2710,4 @@ if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/dbal/cl
        include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/dbal/class.ux_t3lib_db.php']);
 }
 
-?>
\ No newline at end of file
+?>