mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
DQL does not work when setlocale(LC_ALL, 'tr_TR'); was called before #4945
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @AnnaDamm on GitHub (Dec 18, 2015).
When you set the locale with
setlocalefor specific languages before using DQL, the Lexer splits the tokens wrong:(inside a ProductGroupMemberRepository EntityRepository class)
It breaks with the error message:
Error: Expected end of string, got 'I'After some debugging, I found that preg_split apparently works differently on tr_TR. it splits on different characters:
If I use
setlocalewithLC_NUMERICor comment the line out, or use other languages, everything works fine. Even though the regex and DQL are exactly the same thing.