Project

General

Profile

Bug #94709

Updated by Daniel Siepmann almost 3 years ago

The following error id displayed to the user within Backend Maintenance module when doing a DB compare with sqlite database. I've an old v10 updated to current master and trying to execute db compare. 
 <pre> 
 (1/1) TypeError 

 Argument 2 passed to Doctrine\DBAL\Connection::handleExceptionDuringQuery() must be of the type string, array given, called in /home/daniels/Projects/own/website-typo3/project/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php on line 1524 
 </pre> 

 The issue seems to be within _TYPO3\CMS\Core\Database\Schema\SchemaMigrator::migrate_ which generates arrays instead of strings of SQL for SQLite. 

 <pre> 
           $updateSuggestionsPerConnection = array_merge_recursive( 
               $this->getUpdateSuggestions($statements), 
               $this->getUpdateSuggestions($statements, true) 
           ); 
 </pre> 
 Contains the issue, some SQL exists in both and is combined as new array containing duplicates. 

 <pre> 
 at Doctrine\DBAL\Connection->handleExceptionDuringQuery() 
 in /home/daniels/Projects/own/website-typo3/project/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php line 1524 

                 $result = $connection->exec($sql); 
             } 
         } catch (Throwable $e) { 
             $this->handleExceptionDuringQuery( 
                 $e, 
                 $sql, 
                 $params, 
                 $types 
             ); 

 at Doctrine\DBAL\Connection->executeStatement() 
 in /home/daniels/Projects/own/website-typo3/project/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php line 1473 

             'https://github.com/doctrine/dbal/pull/4163', 
             'Connection::executeUpdate() is deprecated, use Connection::executeStatement() instead.' 
         ); 

         return $this->executeStatement($sql, $params, $types); 
     } 

     /** 
      * Executes an SQL statement with the given parameters and returns the number of affected rows. 

 at Doctrine\DBAL\Connection->executeUpdate() 
 in /home/daniels/Projects/own/website-typo3/project/public/typo3/sysext/core/Classes/Database/Schema/SchemaMigrator.php line 142 


             $connection = $connectionPool->getConnectionByName($connectionName); 
             foreach ($statementsToExecute as $hash => $statement) { 
                 try { 
                     $connection->executeUpdate($statement); 
                 } catch (DBALException $e) { 
                     $result[$hash] = $e->getPrevious()->getMessage(); 
                 } 
             } 
 </pre>

Back