Closed fiedsch closed 6 years ago
@ausi Do I quote only admin
or all field names?
AFAIR we agreed on only quoting reserved field names in hardcoded queries.
Ok. Looks crappy though. 😄
Fixed in 86f04c1394031ed00331625b8d565ee4944d3f0c and contao/core-bundle@4b2f9d2b96577d22a49c218bcdb48f67bd2051a3.
When using contao/install I'm asked to create a admin user though there already exists a user with
admin = '1'
in the database.When trying to create a (new) admin user an exception is thrown.
Reason:
admin
is a reserved word in 8.x versions of mySQL (see https://dev.mysql.com/doc/refman/8.0/en/keywords.html which states : "ADMIN became nonreserved in 8.0.12" but 8.0.12 is not yet released.The error occures in
hasAdminUser()
where using`admin` = '1'
would solve the issue.same problem in
persistAdminUser()
I don't know if changes within Contao are required. Especially as
admin
will no longer be a reserved word from mySQL 8.0.12 on. So this is mostly to file the issue so it could by found if somebody else stumbles upon the same problem.