Open tomekit opened 8 years ago
I'm seeing the exact same issue. The enum clauses, from the DB are passed back with single quotes wrapped around the individual values. The simple fix for this for now is to edit file src/console.php Line number 171. Change from:
$TABLECOLUMNS_TYPE_ARRAY .= "\t\t" . "'". $table_column['type'] . "', \n";
TO:
$TABLECOLUMNS_TYPE_ARRAY .= "\t\t" . "'". addslashes($table_column['type']) . "', \n";
I just got the same issue +1
any update on this issue
This error is still happening with enum. Any update ?
Error message (HTTP error 500):
PHP Parse error: syntax error, unexpected 'ja' (T_STRING), expecting ')'
This is the first line with enum, some more are following:
'enum('ja','nein','extern','')',
Forgot to re-run php console generate:admin
, now the values for the enum fields are escaped with slashes.
It's working !
Thanks @mastacontrola
Generated code for enums is not a valid PHP.
E.g. generated:
PHP Error: