Issue Bug Closed

#19177SQL engine parse ERROR: Field type unknown in parseFieldDef()!: near "datetime default '0000-00-00 00:00:00' "

Norbert Bernhardt 08/01/08, 01:23 updated 10/21/10, 21:31

Description

After updating the extension list for updates, Typo3 died with message
SQL engine parse ERROR: Field type unknown in parseFieldDef()!: near “datetime default ’0000-00-00 00:00:00’ “
.

Patch is in ./t3lib/class.t3lib_sqlparser.php
Around line 999:
// Field type:
! if ($result[‘fieldType’] = $this->nextPart($parseString,’^(int|smallint|tinyint|mediumint|bigint|double|numeric|decimal|float|varchar|char|text|tinytext|mediumtext|longtext|blob|tinyblob|mediumblob|longblob|datetime)([[:space:],]+|\()’)) {

replace
if ($result[‘fieldType’] = $this->nextPart($parseString,’^(int|smallint|tinyint|mediumint|bigint|double|numeric|decimal|float|varchar|char|text|tinytext|mediumtext|longtext|blob|tinyblob|mediumblob|longblob)([[:space:],]+|\()’)) {

with
if ($result[‘fieldType’] = $this->nextPart($parseString,’^(int|smallint|tinyint|mediumint|bigint|double|numeric|decimal|float|varchar|char|text|tinytext|mediumtext|longtext|blob|tinyblob|mediumblob|longblob|datetime)([[:space:],]+|\()’)) {

(issue imported from #M9093)

Reviews 0

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