-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[RTM] Fix incompatibilities with PCRE 8.32 in the BackportedTranslator class #10
base: master
Are you sure you want to change the base?
[RTM] Fix incompatibilities with PCRE 8.32 in the BackportedTranslator class #10
Conversation
@plorenz-etes Can you post the translation to use? So we can wrote a test for this problem. |
@baumannsven It basically happens with any translation. The following code will be executed when looking up a translation (BackportedTranslator.php lines 128/129):
Since those regular expressions aren't correct for PCRE 8.32, they can't be compiled and thus, the function |
IMO the lines from Contao core can be used along the corresponding unit tests, see commit contao/contao@75c5d8c |
@discordier Thanks. |
Hi, sorry to ask but since we've got a customer running into this problem - can you tell whether this PR will make it into the next release? |
It will as long as the tests are ported as well and the build runs successfully. Sadly no one of our team has currently the time to port them over, so it would be nice if you could update your PR. As soon all is green, we will be happy to merge. |
@plorenz-etes please add your name and email as author - see check in travis... |
@zonky2 Thank you for the reminder - I have added the requested author line. |
thx! |
The tests are still missing? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests still missing, therefore still a NACK from me.
Due to a regression in PCRE 8.32 there is a problem using the translator on systems using this version of the library. Some regular expressions can't be parsed which breaks functionality. As a result, e.g. using MetaModels isn't possible because every translation returned has the value 'Array'.
In Contao 4.5, the Translator class was introduced and ran into this problem: contao/contao#886
Since the BackportedTranslator class in this project uses parts of the code from the original Contao Translator class, I think the changes made here to Translator.php should also be made to the BackportedTranslator class: contao/contao#916
Changing these two lines in a test installation environment fixes the problem instantly for me.